![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Git
请叫我斌儿
这个作者很懒,什么都没留下…
展开
-
(You cannot push commits with committer‘{xxx@email.com}’who is not exit among the registere
You cannot push commits with committer‘{xxx@email.com}’who is not exit among the registere提代码时检测到邮箱不是被允许的邮箱,提交失败,原因是一开始是自己本地的Git名和邮箱,但是后面公司规范用户名和邮箱,而第一次commit的时候还是旧的,所以提交失败,需要修改到Git仓库允许的用户名和邮箱先输入代码设置用户名和邮箱git commit --amend --author="{username} <em原创 2022-05-13 21:42:41 · 2203 阅读 · 0 评论 -
记录Git non-fast-forward解决办法
git push时出现如下错误解决办法1所有的分支名注意是自己的分支名 git fetch origin historical_institution_init2git merge origin historical_institution_init3git pull origin historical_institution_init这一步执行完就会提示冲突的地方,解决冲突4处理完再次提交就可以了git add .git commit -am '提交信息'想了解原创 2021-11-03 10:48:47 · 209 阅读 · 0 评论 -
git 提交流程及冲突解决
git 多人多分支开发提交流程直接提交 以master为基础分支在master先切换到自己的分支git checkout -b 分支名eg: git checkout -b fixbug写了代码之后提交git add .git commit -am '写了代码'git checkout master //先切到master分支准备拉取最新代码git pull //拉取最新代码git checkout - //切回自己分支git rebase master原创 2021-04-19 18:23:29 · 378 阅读 · 0 评论 -
git更改提交名
记录一下Git改名突然同事问我git提交的名字觉得奇怪,刚好也想改一个名字,记录一下git改名更改前可以看下自己当前的名字git config user.name更改行git config --global user.name xxxx更改完可以用第一个命令看下更改成功没end...原创 2020-08-28 15:58:59 · 619 阅读 · 1 评论 -
项目开发把已经提交的代码转移到别的分支
背景:开发中有master、develop再加自己的分支,一般情况是在自己分支开发然后提交到develop,测试没问题后再合并到master.下面为测试没问题后需要把已经提交到develop的代码也转移到master步骤:1.git checkout master2.git pull origin master3.git checkout -b "分支名"4.git cherry-p...原创 2019-12-19 15:16:39 · 487 阅读 · 0 评论