git 删除忽略文件/文件夹

  • 删除文件
    find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
  • 删除文件夹及其中文件
    find . -name .idea -print0 | xargs -0 git rm -r -f --ignore-unmatch

  • git commit -m 'del ignore file'
  • git pull
  • git push origin master

猜你喜欢

转载自blog.51cto.com/xuguohongai/2544657