赞
踩
1.还未被git追踪的状态
在git中新建一个newText的文件:git status
Untracked files:
(use "git add <file>..." to include in what will be committed)
newText
显示是newText未被追踪,可以用git add file来添加
2.修改已经添加到git中
接下面按提示执行命令:git add newText
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: newText
显示newText已经被添加到git,等待提交
3.文件已被修改但是还未把修改提交给git
从1到2是对于新添加的文件,但是对于已存在git追踪中的文件,修改一下newText:git status
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: newText
显示是newnewText被修改了,但是还没有被添加到git中执行:git add newText
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: newText
和2状态就一样了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。