Usually a git-revert command applies a new commit that is equivalent to the opposite of the merge you didn't want. If you actually want to rewind history, which can be DANGEROUS, do the following:
DANGER DANGER: git reset --hard [SHA YOU WANT TO BE AT] note that this will reset your tree to that SHA, *including deleting any new files you've created!!!** This is a true reset and will make your tree look exactly like that commit, NO OTHER CHANGES. be really careful. Then you can do: DANGER: git push origin HEAD --force which will make the remote exactly like your own tree. If anyone has pulled from the remote branch this will cause problems. Short answer: don't push bad merges :) owen On Fri, 2013-06-21 at 23:45 +0200, Max Linke wrote: > Hi > > I want to revert a merge that I made accidently and already pushed to > mit github repo. So rewriting history with 'git reset --hard HEAD' > might cause some trouble. I found that > > git revert -m <parent-number> <commit> > > should to what I want but I haven't found a way yet to determine the > parent number. > > Here is the log for that branch, I want to revert to 93f2183199bbc9ff > > commit fdc3143f47bee803adeb4bc27a5c544686ee7794 > Author: Max Linke <kai...@mixxx.org> > Date: Fri Jun 21 17:24:12 2013 +0200 > > Revert "Merge branch 'master' into multiplyFolders" > > This reverts commit e28c83b6a46e523049f463ca6a9a0b2eae0e3fa9, > reversing changes made to 168a4450987d53c27afd3d7e73e4d0f7e9facdd4. > > commit 5901cc3e5833111309e8ca2ec0e8115d0f5b4a38 > Merge: 93f2183 e28c83b > Author: Max Linke <kai...@mixxx.org> > Date: Fri Jun 21 16:29:21 2013 +0200 > > Merge remote-tracking branch 'origin/multiplyFolders' into > mb_errorMessage > > commit e28c83b6a46e523049f463ca6a9a0b2eae0e3fa9 > Merge: 168a445 87ea884 > Author: Max Linke <max_li...@gmx.de> > Date: Fri Jun 21 13:22:25 2013 +0200 > > Merge branch 'master' into multiplyFolders > > commit 87ea884419af41071c6a334a32a3d3b4e6222f38 > Merge: a313b38 e9510b9 > Author: Daniel Schürmann <dasch...@mixxx.org> > Date: Thu Jun 20 15:15:30 2013 -0700 > > Merge pull request #16 from daschuer/atomic-co > > Remove CO* constructor to COT. Cleanups. > > commit e9510b94e890900211c64617552e5a284a70e5ae > Author: Daniel Schürmann <dasch...@mixxx.org> > Date: Thu Jun 20 23:56:23 2013 +0200 > > added valueChangedFromEngine connections back in > > commit 93f2183199bbc9ff3005ebdacdfbc9ea8ba53523 > Author: Max Linke <kai...@mixxx.org> > Date: Thu Jun 20 23:29:10 2013 +0200 > > add new error page for general error and a service name not working > currently > > best Max > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Get Mixxx, the #1 Free MP3 DJ Mixing software Today > http://mixxx.org > > > Mixxx-devel mailing list > Mixxx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mixxx-devel > ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel