Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: Undo a commit that is already pushed to central server and merged to several branches

From: Matthias Fechner <hidden>
Date: 2016-06-15 22:52:35

Dear Ramkumar and Johan,

Am 07.12.11 17:01, schrieb Johan Herland:
Use "git revert $commit" to undo the effects of the given $commit.
This must be applied to all affected branches (either by reverting in
the master branch and remerging master to the other branches, or by
using "git revert" in each individual branch).
thanks a lot for your help.
The steps I did now was at first undo everything i did locally with:
git reset --hard origin/master

Then undo the bad commit:
git revert commit-id
git commit

Now the bad commit was undone and I merged the master branch in all 
other branches.

I create a new branch and cherry-picked the bad commit into it so I can 
correct the problem there and later merge this branch in all the other ones.

Hopefully this short summary will help other users having the same problem.

Bye
Matthias

-- 
"Programming today is a race between software engineers striving to 
build bigger and better idiot-proof programs, and the universe trying to 
produce bigger and better idiots. So far, the universe is winning." -- 
Rich Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help