From: Uwe Koloska <orgmode@koloro.de>
To: emacs-orgmode@gnu.org
Subject: Re: Branch "next" garbled
Date: Wed, 3 Oct 2018 22:46:25 +0200 [thread overview]
Message-ID: <e8261f62-2650-a07c-af8d-1a1a449d2792@koloro.de> (raw)
In-Reply-To: <84ftxn45jn.fsf@gmail.com>
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
prev parent reply other threads:[~2018-10-03 20:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-03 11:45 Branch "next" garbled Marco Wahl
2018-10-03 16:47 ` Nicolas Goaziou
2018-10-03 20:21 ` Marco Wahl
2018-10-12 1:44 ` Adrian Bradd
2018-10-12 3:17 ` Kaushal Modi
2018-10-03 20:46 ` Uwe Koloska [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=e8261f62-2650-a07c-af8d-1a1a449d2792@koloro.de \
--to=orgmode@koloro.de \
--cc=emacs-orgmode@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.