摘要:
原单个文件/文件夹: $ git checkout -- filename 所有文件/文件夹: $ git checkout . 2. 本地新增了一堆文件(并没有git add到暂存区),想放弃修改。单个文件/文件夹: $ rm filename / rm dir -rf 所有文件/文件夹: $ g 阅读全文
摘要:
1、.gitignore文件不生效(如果先将项目添加的git仓库,后添加忽略文件,不清理git的缓存,忽略文件是不会生效的。) git rm -r --cached .git add .git commit -m 'update .gitignore' 最后更新.gitignore文件再次提交 2、 阅读全文