Am 03.10.18 um 13:45 schrieb Marco Wahl: > My git fu was not strong enough and so the "next" branch is a bit messy > right now. (I tried to activate a local clean version of the "next" > branch.) > > I thought I could easily rollback the mess I created by going back to > the git node 3c8fd4fa7 which is the last git node before my activities. > > The command I used is > > git revert 3c8fd4fa7 > > Unfortunately this did not revert the repo to that node.
To make your git fu a bit stronger, let me explain this: 'git revert' creates a new commit, that reverses the changes from the given commit, so it's not, what you have had in mind (and what is common for SCMs like SVN where you cannot rewrite the history). You are looking for 'git reset': https://git-scm.com/book/en/v2/Git-Tools-Reset-Demystified There are other ways, to achieve the same result: Just rename the branch and checkout a new one with the old name at the given commit. That gives you a nice backup for free. Or utilize the 'reflog': http://gitready.com/intermediate/2009/02/09/reflog-your-safety-net.html Hope this helps Uwe