【发布时间】:2011-12-04 00:07:36
【问题描述】:
我做了这样的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"自动添加所有更改(w.r.t. .gitignore)。您可能只想添加特定的文件/目录:git add file.src
标签: git version-control git-commit