开发者

delete first git commit

开发者 https://www.devze.com 2023-01-10 10:41 出处:网络
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.Ho开发者_JAVA百科w can I delete this?You can just force-push a repo

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. Ho开发者_JAVA百科w can I delete this?


You can just force-push a repository containing the initial commit you want to Github using git push --force.


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消