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
Will emit the remote being tracked:
git config branch..remote
Will emit the ref being tracked on that remote:
git config branch..merge
I don't believe that there is a combined command that will emit both together (at least within normal Git; you could always make your own).
For example, for a local master
branch:
$ git config branch.master.remote
origin
$ git config branch.master.merge
refs/heads/master