![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
git
天道988
既然选择了IT,就做好了终身学习的准备!
展开
-
在同一台机器上有多个 git 账号,修改提交人邮件和姓名
在同一台机器上可能有公司的 git 账号,同时还有自己的 github 账号。git config --global user.namegit config --global user.email设置的是全局的用户名/邮箱,不管往单位的仓库提交代码还是往 github 提交仓库使用的提交人的姓名/邮箱都是全局的。现在想让往 github 提交时代码的 user.name 和 u...原创 2020-04-21 17:10:50 · 709 阅读 · 0 评论 -
git 强制回滚到某次提交,不留下提交历史
回滚到 xxx 次提交 git reset --hard xxx强制提交,本地覆盖远程 git push --force原创 2020-04-21 16:53:01 · 2192 阅读 · 1 评论 -
Mac 系统永久删除 git 中的 .DS_Store 文件
参考链接:how-can-i-remove-ds-store-files-from-a-git-repository找到已存在的 .DS_Store 文件并删除: find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch在 .gitignore 文件中添加一行: .DS_Store提交 .gi...翻译 2019-11-19 17:09:16 · 465 阅读 · 0 评论