git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Santi Béjar" <santi@agolina.net>
To: jateeq <jawad_atiq@hotmail.com>
Cc: git@vger.kernel.org
Subject: Re: Identifying the branch a clone was cloned from
Date: Wed, 3 Mar 2010 00:15:30 +0100	[thread overview]
Message-ID: <adf1fd3d1003021515t765b8acawa28196693da21681@mail.gmail.com> (raw)
In-Reply-To: <27761617.post@talk.nabble.com>

On Tue, Mar 2, 2010 at 10:45 PM, jateeq <jawad_atiq@hotmail.com> wrote:
>
> Hey guys,
>
> I have a repository with over 10 branches. I clone from branch 2, and some
> time after the operation I need to find out what branch in the remote I
> cloned from. Anyone know the command for that?

If you mean from which branch you forked a given branch it is
specified in the branch.<name>.remote and branch.<name>.merge + some
logic. To get it you can use the branchname@{upstream} syntax (new in
1.7.0) or use this command:

git for-each-ref --format='%(upstream)' refs/heads/branchname

But maybe we can help more if you say what you want to accomplish with
this information and not this specific detail.

HTH,
Santi

      reply	other threads:[~2010-03-02 23:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 21:45 Identifying the branch a clone was cloned from jateeq
2010-03-02 23:15 ` Santi Béjar [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=adf1fd3d1003021515t765b8acawa28196693da21681@mail.gmail.com \
    --to=santi@agolina.net \
    --cc=git@vger.kernel.org \
    --cc=jawad_atiq@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 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).