Git status操作
Git status获取的是:工作区、暂存区、的文件/内容是否同步。共3种状态
Changes not staged for commit
Changes to be committed
Untracked files
1.工作区有修改,未add到暂存区:Changes not staged for commit
2.已add到暂存区,未commit到本地git仓库:Changes to be committed
3. 使用git restore --staged file,回退暂存区已经add的记录,再次git status,则显示:Changes not staged for commit
4.使用git restore file,回退工作区已修改的记录,文件显示未修改前的内同,再次git status,则显示:nothing to commit, working tree clean
5.工作区新增文件,未add到缓存区,显示:Untracked files文件未被追踪
标签:status,Git,add,暂存区,git,操作,Changes From: https://www.cnblogs.com/shaohuang/p/17505853.html