查看当前文件状态 使用git status查看文件状态,如果是空仓库,执行结果如下 $ git status On branch master No commits yet nothing to commit (create/copy files and use "git add" to track) 如果我们加入一个新文件main.c $ git status On branch master No commits yet Untracked files: (use "gi
git add --all 为啥不能添加空文件夹,这样设计的初衷是? 好多项目还得弄个假文件在空文件夹里面占位 这个算设计失误吧,见 https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F Currently the design of the git index (staging area) only permits files to be listed, and nobody competent
如果我们更改了之前已经被跟踪的main.c,然后执行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 dir