On Mon, Dec 24, 2012 at 11:09 AM, Seth Robertson <in-gitvger@xxxxxxxx> 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. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html