git add -A stages All git add . stages new and modified, without deleted git add -u stages modified and deleted, without new git init echo Change me > change-me echo Delete me > delete-me git add change-me delete-me git commit -m initial echo OK…
git add将当前工作目录中更改或者新增的文件加入到Git的索引中,加入到Git的索引中就表示记入了版本历史中,这也是提交之前所需要执行的一步.可以递归添加,即如果后面跟的是一个目录作为参数,则会递归添加整个目录中的所有子目录和文件. git add [path]表示 add to index only files created or modified and not those deleted .通常是通过git add [path]的形式把[path]添加到索引库中,[path]可以是文…