git删除远程.idea目录

Posted yifansj

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git删除远程.idea目录相关的知识,希望对你有一定的参考价值。

1. 登录

[email protected] MINGW32 / (master)
$ git config --global user.name "yifanyifan"

Administrator@USER-20180708AB MINGW32 / (master)
$ git config --global user.email "[email protected]"

2. 定位操作项目

[email protected] MINGW32 / (master)
$ cd C:/Users/Luke/IdeaProjects/ssmp-crud5

3. 删除缓存区.idea(保留工作区.idea)

[email protected] MINGW32 /c/Users/Luke/IdeaProjects/ssmp-crud5 (master)
$ git rm --cached -r .idea

4. 提交gitiginore文件,将.idea从源代码仓库中删除(-m 表示注解)

[email protected] MINGW32 /c/Users/Luke/IdeaProjects/ssmp-crud5 (master)
$ git commit -m "commit and remove .idea"

5. 推送到远程端

[email protected] MINGW32 /c/Users/Luke/IdeaProjects/ssmp-crud5 (master)
$ git push origin master

 

以上是关于git删除远程.idea目录的主要内容,如果未能解决你的问题,请参考以下文章