0

How can delete one duplicate commit in Git ? I cannot push because I get the error:

error : duplicate commit 

I can't seem to be able to delete this commit.

2 Answers 2

3

If $br is empty, the checkout cmd creates a branch whose name is 95196f3b7ac656803cd4ed703d6d06b15e527e40 which points to HEAD. However it's also the name of a git object, the commit 95196f3b7ac656803cd4ed703d6d06b15e527e40. When you run git show 95196f3b7ac656803cd4ed703d6d06b15e527e40, git does not know to show HEAD or the true 95196f3b7ac656803cd4ed703d6d06b15e527e40. So it's ambitious.

Sign up to request clarification or add additional context in comments.

Comments

0

If you figure out what that ref is to:

git [log|branch|tag] | grep 95196f3b7ac656803cd4ed703d6d06b15e527e40

...then you can delete or push it, as appropriate.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.