git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Fechner <idefix@fechner.net>
To: Johan Herland <johan@herland.net>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Undo a commit that is already pushed to central server and merged to several branches
Date: Thu, 08 Dec 2011 10:46:26 +0100	[thread overview]
Message-ID: <4EE08772.3070703@fechner.net> (raw)
In-Reply-To: <CALKQrgcQ5jv+oDXxDoTGUhmP-Dg344-oSotb+q-4a3fnEBY1Zw@mail.gmail.com>

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

      reply	other threads:[~2011-12-08  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 14:15 Undo a commit that is already pushed to central server and merged to several branches Matthias Fechner
2011-12-07 14:42 ` Ramkumar Ramachandra
2011-12-07 15:35   ` Matthias Fechner
2011-12-07 16:01     ` Ramkumar Ramachandra
2011-12-07 16:01     ` Johan Herland
2011-12-08  9:46       ` Matthias Fechner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EE08772.3070703@fechner.net \
    --to=idefix@fechner.net \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johan@herland.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).