I\'d like a command that emits the name of the tracked branch for the branch I\'m on. Something like:
$ git checkout --track -b topic origin/master Branch t
git config --global alias.show-upstream '!sh -c '\'' test -n "$1" || set -- HEAD set -- "$(git rev-parse --symbolic-full-name "$1")" git for-each-ref --format="%(upstream:short)" "$1" '\'' -' git show-upstream git show-upstream HEAD git show-upstream some/local/branch