I've just started to use git and It's driving me nuts. If I'm understanding the way git works correctly:
However, if I have a 100 tracked files that have been modified adding them all individually in preparation for a commit is pretty tedious. When I do a svn commit from the root of my tree subversion will by default commit only tracked files that have been modified added with 'svn add' or deleted with 'svn rm'.
So the question is, is there a single git command that will do what 'svn commit' does, i.e. add and commit only all the tracked files that have been modified or deleted and not add every single solitary file in the tree to the staging pool?
答案 0 :(得分:5)
git add -u
should add only modified and removed files.