All of lore.kernel.org
 help / color / mirror / Atom feed
From: "George Spelvin" <linux@horizon.com>
To: johnlumby@hotmail.com, linux@horizon.com
Cc: git@vger.kernel.org, timmazid@hotmail.com
Subject: Re: git  --  how to revert build to as-originally-cloned?
Date: 20 May 2011 16:22:20 -0400	[thread overview]
Message-ID: <20110520202220.24482.qmail@science.horizon.com> (raw)
In-Reply-To: <4DD6BE8D.4080708@hotmail.com>

> I have tried gitk.  Can you or someone tell me what the colours of
> the nodes in the top left signifies?  Specifically, a commit of mine
> (done since all the merging I've been asking about) shows as yellow,
> whereas all the ones prior to that show as blue.

Nothing.  It just tries to use different colours so you can tell the
lines apart.  But the specific colour is no more meaningful than
shadings on a map.

> So what would be the correct way,  before doing my fast-forward merge,
> to have made some kind of mark pointing at "a",  which I could then have
> used to undo the fast-forward,  without having to calculate the number
> of commits in between?  (supposing my branch was not anchored at "a"
> but at some much earlier point)?

The basic tool to do that is "git tag <name>", which creates a tag with
the given name.  (The difference between a tag and a branch is simply
that a branch is updated when you commit.)

However, most people don't bother with an explicit name; see the man page
for git-rev-parse for a list of all the ways to refer to old revisions.
@{1} is the usual syntax for "the current branch before the last change",
or you can use the older name ORIG_HEAD, too.

"git reflog" will show an extended history.

  parent reply	other threads:[~2011-05-20 20:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20 16:25 git -- how to revert build to as-originally-cloned? George Spelvin
2011-05-20 19:18 ` John Lumby
2011-05-20 19:34   ` Paul Ebermann
2011-05-20 20:22   ` George Spelvin [this message]
2011-05-20 20:26     ` George Spelvin
  -- strict thread matches above, loose matches on Subject: below --
2011-05-18 22:53 John Lumby
2011-05-18 23:26 ` Tim Mazid
2011-05-19 15:27   ` John Lumby
2011-05-20  2:16     ` Tim Mazid
2011-05-20 14:15       ` John Lumby
2011-05-20 14:42 ` Philippe Vaucher

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=20110520202220.24482.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=git@vger.kernel.org \
    --cc=johnlumby@hotmail.com \
    --cc=timmazid@hotmail.com \
    /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.
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.