Re: get-upstream
- From
Jeff King <peff@peff.net>
- Date
- Sep 23, 2010, 05:37 UTC
- Message-ID
- <20100923053717.GB27540@sigill.intra.peff.net>
- In-Reply-To
- <AANLkTi=QnP0CUCU=6fR50UzphnVMVvmfe9mkqpf1NHLt@mail.gmail.com>
On Thu, Sep 23, 2010 at 02:16:43PM +1000, Ramana Kumar wrote:
> Thanks Pat - that's awesome. > Is there a git shortcut for removing the refs/remotes or refs/heads > prefix? (I know I can just use other progs for that too)
If you use the for-each-ref solution, you can use the :short modifier, like:
git for-each-ref --format='%(upstream:short)' `git symbolic-ref HEAD`
-Peff