From: Tomas Carnecky <tomas.carnecky@gmail.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
Seth Robertson <in-gitvger@baka.org>
Cc: Woody Wu <narkewoody@gmail.com>, git <git@vger.kernel.org>
Subject: Re: Find the starting point of a local branch
Date: Mon, 24 Dec 2012 05:34:51 +0000 [thread overview]
Message-ID: <1356327291-ner-6552@calvin> (raw)
In-Reply-To: <CACsJy8CNd3W_WUMbZ1QZ4ReZ5ziX90QejK9mh1TMs0ig33kGMw@mail.gmail.com>
On Mon, 24 Dec 2012 12:28:45 +0700, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
> On Mon, Dec 24, 2012 at 11:09 AM, Seth Robertson <in-gitvger@baka.org> wrote:
> >
> > In message <20121224035825.GA17203@zuhnb712>, Woody Wu writes:
> >
> > How can I find out what's the staring reference point (a commit number
> > or tag name) of a locally created branch? I can use gitk to find out it
> > but this method is slow, I think there might be a command line to do it
> > quickly.
> >
> > The answer is more complex than you probably suspected.
> >
> > Technically, `git log --oneline mybranch | tail -n 1` will tell you
> > the starting point of any branch. But...I'm sure that isn't what you
> > want to know.
> >
> > You want to know "what commit was I at when I typed `git branch
> > mybranch`"? The problem is git doesn't record this information and
> > doesn't have the slightest clue.
>
> Maybe we should store this information. reflog is a perfect place for
> this, I think. If this information is reliably available, git rebase
> can be told to "rebase my whole branch" instead of my choosing the
> base commit for it.
What's the starting point of the branch if I type: git branch foo <commit-ish>?
next prev parent reply other threads:[~2012-12-24 5:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-24 3:58 Find the starting point of a local branch Woody Wu
2012-12-24 4:09 ` Seth Robertson
2012-12-24 5:28 ` Nguyen Thai Ngoc Duy
2012-12-24 5:34 ` Tomas Carnecky [this message]
2012-12-24 5:45 ` Nguyen Thai Ngoc Duy
2012-12-24 6:27 ` Junio C Hamano
2012-12-24 11:21 ` Nguyen Thai Ngoc Duy
2012-12-24 19:10 ` Junio C Hamano
2012-12-25 1:09 ` Nguyen Thai Ngoc Duy
2012-12-24 6:19 ` Jeff King
2012-12-24 11:16 ` Nguyen Thai Ngoc Duy
2012-12-24 15:34 ` Jeff King
2012-12-24 7:31 ` Woody Wu
2012-12-24 9:12 ` Kevin
2012-12-24 17:24 ` Martin von Zweigbergk
2012-12-28 5:15 ` Woody Wu
2012-12-28 6:38 ` Martin von Zweigbergk
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=1356327291-ner-6552@calvin \
--to=tomas.carnecky@gmail.com \
--cc=git@vger.kernel.org \
--cc=in-gitvger@baka.org \
--cc=narkewoody@gmail.com \
--cc=pclouds@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).