从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 目录

posted @ 2019-02-28 16:48  aspirant  阅读(4858)  评论(0编辑  收藏  举报