我做了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"
自动添加的所有更改(WRT的.gitignore)。您可能只想添加特定的文件/目录:git add file.src