1. 登录

Administrator@USER-20180708AB MINGW32 / (master)
$ git config --global user.name "yifanyifan"

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

2. 定位操作项目

Administrator@USER-20180708AB MINGW32 / (master)
$ cd C:/Users/Luke/IdeaProjects/ssmp-crud5

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

Administrator@USER-20180708AB MINGW32 /c/Users/Luke/IdeaProjects/ssmp-crud5 (master)
$ git rm --cached -r .idea

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

Administrator@USER-20180708AB MINGW32 /c/Users/Luke/IdeaProjects/ssmp-crud5 (master)
$ git commit -m "commit and remove .idea"

5. 推送到远程端

Administrator@USER-20180708AB MINGW32 /c/Users/Luke/IdeaProjects/ssmp-crud5 (master)
$ git push origin master
03-17 17:27