Re: get-upstream
- From
Pat Notz <patnotz@gmail.com>
- Date
- Sep 23, 2010, 04:05 UTC
- Message-ID
- <AANLkTikQ8sHrp+sSZ8e8u7L+6=NHVY3cD9DwChAzLEk0@mail.gmail.com>
- In-Reply-To
- <AANLkTikqJmsUo53dRngXcWsoEfcFzLQ-J1V5oZOGUL03@mail.gmail.com>
$ git rev-parse --symbolic-full-name @{upstream}On Wed, Sep 22, 2010 at 9:46 PM, Ramana Kumar <ramana.kumar@gmail.com> wrote:
Show 26 quoted lines
> Is there an easy command to get a symbolic reference to the upstream > branch of a tracking branch? > > For example, to get the current branch name I can do this: > > $ git symbolic-ref HEAD > refs/heads/mybranchname > > Now I can see the upstream name as follows > > $ git branch -vv > branch1 ... > mybranchname sha [upstreamname: ahead n] ... > branch3 ... > > My question is is there a way to get upstreamname directly to stdout, > similar to the symbolic-ref command? > > (I don't want to have to type it manually; tab completion helps a > little, but looking for more. Plus this would be necessary to avoid > scraping in a script.) > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >