From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Koloska Subject: Re: Branch "next" garbled Date: Wed, 3 Oct 2018 22:46:25 +0200 Message-ID: References: <84ftxn45jn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7oCC-0000jw-6I for emacs-orgmode@gnu.org; Wed, 03 Oct 2018 16:56:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7oC8-0001PA-II for emacs-orgmode@gnu.org; Wed, 03 Oct 2018 16:56:35 -0400 Received: from dd2332.kasserver.com ([85.13.129.21]:48489) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g7oC7-0000xr-DS for emacs-orgmode@gnu.org; Wed, 03 Oct 2018 16:56:32 -0400 Received: from bilbo.auenland (ip5f5a9edd.dynamic.kabel-deutschland.de [95.90.158.221]) by dd2332.kasserver.com (Postfix) with ESMTPSA id 8B62FF036AB for ; Wed, 3 Oct 2018 22:46:31 +0200 (CEST) Received: from [192.168.0.119] (elessar.fritz.box [192.168.0.119]) by bilbo.auenland (Postfix) with ESMTP id D438E17EED4 for ; Wed, 3 Oct 2018 22:46:25 +0200 (CEST) In-Reply-To: <84ftxn45jn.fsf@gmail.com> Content-Language: en-GB List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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.) >=20 > 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. >=20 > The command I used is >=20 > git revert 3c8fd4fa7 >=20 > 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