删除第一个git commit [英] delete first git commit

查看:205
本文介绍了删除第一个git commit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次犯错时犯了一个错误。我在别人的电脑上,用他们的user.name而不是我的版本推送了一个版本。我怎样才能删除它?

解决方案

有很多与此相关的重复问题。以下是替换树的第一次提交的通用解决方案。执行此步骤后,您可以使用 git rebase -i 进行任何其他更改。



在Git的根提交之前插入提交?


I made a mistake when I first committed. I'm on another person's computer and pushed a version with their user.name instead of mine. How can I delete this?

解决方案

There are a lot of duplicate questions related to this. The following is a generic solution for replacing the first commit of your tree. After you perform this step, you can make any other changes using git rebase -i.

Insert a commit before the root commit in Git?

这篇关于删除第一个git commit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆