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
原文地址:https://www.cnblogs.com/yifanSJ/p/9284623.html
时间: 2024-10-29 18:34:43