Reputation: 357
I committed D' based on B, but some one committed/pushed C on the remote repo. I pushed my D' to the remote repo. But unfortunately I noticed the remote repo merged D with C, and C is not a good commit. But now things are done. could I regret and make the branch commits list as A->B->D->E? By the way, there has no more new commit based on C.
Upvotes: 1
Views: 376
Reputation: 35075
I suggest that you do not use --force
. A forward fix - rather than changing history - is safe and it's a good solution in almost all cases.
A forward fix could be:
git revert C
is enough if you just want to get rid of C
.Upvotes: 2