我像这样执行了一个git commit -m "message"
:
> git commit -m "save arezzo files"
# On branch master
# 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: arezzo.txt
# modified: arezzo.jsp
#
no changes added to commit (use "git add" and/or "git commit -a")
但之后,当我执行git status
时,它显示相同的修改文件:
> git status
# On branch master
# 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: arezzo.txt
# modified: arezzo.jsp
#
no changes added to commit (use "git add" and/or "git commit -a")
我做错了什么?
git commit -am "save arezzo files"
可以自动添加所有更改内容(与.gitignore有关)。您也可以只添加特定的文件/目录:git add file.src
。 - mbx