从git中删除 .idea 目录

  1. 将.idea目录加入ignore清单:

    $ echo '.idea' >> .gitignore

  2.  

    从git中删除idea:

    $ git rm —cached -r .idea

  3. 3

    将.gitignore文件加入git:

    $ git add .gitignore

  4. 4

    Commit gitignore文件,将.idea从源代码仓库中删除:

    $ git commit -m '(gitignore commit and remove .idea)'

  5. 5

    Push到服务器:

     $ git push

    参考:从git中删除 .idea 目录

原文地址:https://www.cnblogs.com/aspirant/p/10451437.html