gpt4 book ai didi

git - 如何更改已提交 GitHub 上的身份

转载 作者:行者123 更新时间:2023-12-05 07:29:31 25 4
gpt4 key购买 nike

所以我是 GitHub 的新手,我正在尝试通过更新 original master 来重新设置我的分支。因此我把:

git rebase "originial_remote"/"branch_name"

这似乎有效,但是我得到一个错误

fatal: empty ident name (for <zeeuwwd@PC-18398.tsn.tno.nl>) not allowed

这是有道理的,因为我认为我用空身份提交了更改(这是因为我的 Ubuntu 崩溃了,我不得不重新安装它,但没有再次设置身份..)。所以,我的问题是,既然我已经将我的身份添加到帐户中,我如何才能确保这些先前的提交也获得正确的身份,因为我认为这可以解决问题。

有什么想法吗?多谢你们!韦塞尔

最佳答案

来自 git 文档:

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup

您需要添加user.nameuser.email

编辑:更改作者姓名:

How to change the commit author for one specific commit?

关于git - 如何更改已提交 GitHub 上的身份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52696816/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com