git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Matthias Fechner <idefix@fechner.net>
Date
Dec 7, 2011, 14:15 UTC
Message-ID
<4EDF74EC.6090504@fechner.net>
Dear git list,

I commited two files into the master branch (later I figured out that the files included a lot bugs).

I continued to work then on different branches and merged the bad master branch to all my other branches.

I pushed the master branch then to the server including the bogus commit.

What I would like to do is move this bogus commit into a different branch and remove all changes from this bogus commit from every branch.

Is this possible and how?

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
Next: Ramkumar Ramachandra
Message 1 of 6 in “Undo a commit that is already pushed to central server and merged to several branches”
  1. Matthias FechnerDec 7, 2011
  2. Ramkumar RamachandraDec 7, 2011
  3. Matthias FechnerDec 7, 2011
  4. Ramkumar RamachandraDec 7, 2011
  5. Johan HerlandDec 7, 2011
  6. Matthias FechnerDec 8, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.