From: Junio C Hamano <gitster@pobox.com>
To: Paul Gardiner <osronline@glidos.net>
Cc: git@vger.kernel.org
Subject: Re: How to find where a branch was taken from.
Date: Fri, 21 Mar 2008 02:13:19 -0700 [thread overview]
Message-ID: <7v4pb0qw28.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <47E37A63.9070209@glidos.net> (Paul Gardiner's message of "Fri, 21 Mar 2008 09:05:39 +0000")
Paul Gardiner <osronline@glidos.net> writes:
> I need a command that will find the remote branch from which
> the currently checked out branch was started. I don't know
> git very well, and the only way I can think to do it so far
> is to iterate over the remote branches and find the one
> for which git-rev-list <branch>..HEAD gives the smallest
> number of objects. I'm guessing there must be a better
> way. Any ideas?
There will be _no_ way. It is simply impossible.
$ git checkout -b my-new-branch origin/somerandombranch~27^2^2~23
is a perfectly valid way to create a new branch.
You would probably want to re-think in a bigger picture, _why_
you would want to find such information, in other words, how you would
want to use the information (if such a thing were possible) to solve
_what_ problem. That true problem you did not mention (and assumed that
"the remote branch the branch was branched from" would be a good tool to
solve it) might have a better solution.
next prev parent reply other threads:[~2008-03-21 9:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-21 9:05 How to find where a branch was taken from Paul Gardiner
2008-03-21 9:13 ` Junio C Hamano [this message]
2008-03-21 9:15 ` Junio C Hamano
2008-03-21 17:39 ` Avery Pennarun
2008-03-21 18:32 ` Charles Bailey
2008-03-21 18:48 ` Avery Pennarun
2008-03-21 20:03 ` Dmitry Potapov
2008-03-21 20:22 ` Daniel Barkalow
2008-03-21 20:25 ` J. Bruce Fields
2008-03-22 12:12 ` Paul Gardiner
2008-03-22 16:41 ` Jeff King
2008-03-22 16:54 ` Paul Gardiner
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=7v4pb0qw28.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=osronline@glidos.net \
/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).