Hi all

Is it possible to have something like @{upstream} but referring to the
'branch.<name>.pushremote' or 'remote.pushdefault'?

My workflow is something like:

The setup:
$ git init
$ git remote add origin <url1>
$ git remote add second <url2>
$ git fetch origin
$ git checkout -t origin/master
$ git config branch.master.pushremote second

And then, I am interested in two different commands:
$ git show-branch master origin/master # to see incoming commits, i.e.
$ git show-branch master second/master # to see outgoing commits, i.e.

I have many other branches and I want to make a script or an alias. So the
first line is:
$ git show-branch HEAD HEAD@{upstream}
And the second one would be something like:
$ git show-branch HEAD HEAD@{*remote-upstream*}

FWIW, this is my complete alias for the first line:
git show-branch `git symbolic-ref --short HEAD -q || echo HEAD` `git
rev-parse --symbolic-full-name --abbrev-ref HEAD@{upstream}`

Daniel Fanjul Alcutén
Tools Engineer @Spotify AB

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to