Git 更改提交者作者姓名
我需要SOS帮助,我向bitbucket提交了一个项目,并以我的姓名提交,但我需要更改作者姓名(和电子邮件地址)Git 更改提交者作者姓名,git,Git,我需要SOS帮助,我向bitbucket提交了一个项目,并以我的姓名提交,但我需要更改作者姓名(和电子邮件地址) 最简单的方法是什么?您只需修改上一次提交和推送(强制) 因此,BitBucket上的最新提交不是本地的最新提交:您已经进行了另外两次提交 首先检查是否可以重置bitbucket中的一个 git checkout -b tmp git reset --hard origin/master git commit --amend --author="Your name <your
最简单的方法是什么?您只需修改上一次提交和推送(强制)
因此,BitBucket上的最新提交不是本地的最新提交:您已经进行了另外两次提交 首先检查是否可以重置bitbucket中的一个
git checkout -b tmp
git reset --hard origin/master
git commit --amend --author="Your name <yourEmail@example.com>"
git push --force
git签出-b tmp
git重置--硬原点/主原点
git commit--amend--author=“您的姓名”
吉特推力
如果您看到的一切正常,那么您可以应用两个下一个提交:
git cherry-pick tmp~1
git commit --amend --author="Your name <yourEmail@example.com>"
git cherry-pick tmp
git commit --amend --author="Your name <yourEmail@example.com>"
git push
git cherry pick tmp~1
git commit--amend--author=“您的姓名”
吉特樱桃采摘tmp
git commit--amend--author=“您的姓名”
git推送
@OznOg-True。我在答案中加入了你的评论以提高可视性。在我运行第一行之后,它告诉我有冲突,如何解决?@Devy在你推的时间和现在之间,你做过任何git拉吗?你有什么工作在进行中吗?git status
的输出是什么?git status
的输出是:在分支主机上,您的分支比“origin/master”早2次提交。(使用“git push”发布您的本地提交)无需提交,工作树cleanHi,当我运行cherry pick命令时,我得到错误:cherry pick不可能,因为您有未合并的文件。
可能重复
Your branch is ahead of 'origin/master' by 2 commits.
git checkout -b tmp
git reset --hard origin/master
git commit --amend --author="Your name <yourEmail@example.com>"
git push --force
git cherry-pick tmp~1
git commit --amend --author="Your name <yourEmail@example.com>"
git cherry-pick tmp
git commit --amend --author="Your name <yourEmail@example.com>"
git push