清除git仓库缓存,使.gitignore中的配置生效

  1. 清空git仓库缓存
 git rm -r --cached . 
  1. 重新加入仓库
 git add -A
  1. 重新执行本地提交
git commit -m "重新提交"
  1. 重新执行远程提交
 git push -u origin  分支名称

猜你喜欢

转载自blog.csdn.net/yangfenggh/article/details/131004050