已经增加到.gitignore文件里面的目录or文件会被git忽略。 如果本次需要修改一个忽略文件: $ git status --ignored --ignored -- show ignored files as well $ git add -f --force -f -- allow adding otherwise ignored files
Git commit相关:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# 空提交,只在特殊情况下使用(产生一个新的commit点) $ git commit On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working tree clean # 解决方法 $ git commit -m "empty commit" --allow-empty
# 不带message提交(慎用,message很重要) $ git commit Aborting commit due to empty commit message. # 解决方法 $ git commit --allow-empty-message