github changes not staged for commit

来源:互联网 发布:淘宝玻璃喷雾瓶 编辑:程序博客网 时间:2024/04/29 13:20

在文件夹中删除文件后git commit,出现

On branch masterChanges not staged for commit:

no changes added to commit

解决:
http://stackoverflow.com/questions/10721624/github-changes-not-staged-for-commit

git add .

原理:

It is also common to recursively add all files in a new project by specifying the current working directory like this: git add .. Since Git will recursively add all files under a directory you give it, if you give it the current working directory, it will simply start tracking every file there. In this case, a git add . would have done the same thing as a git add README hello.rb, or for that matter so would git add *, but that's only because we don't have subdirectories which the * would not recurse into.

http://gitref.org/basic/

0 0