Given a properly configured local, remote-tracking branch example
, what is the shortest way to fetch example
's remote counterpart specifically?
I could use a bare git fetch origin
to fetch all branches, the counterpart included, but this would cause a large additional amount of data to be downloaded, which I'd like to avoid.
If the counterpart shares the name example
, I could run git fetch origin example:
, but that name similarity is not guaranteed.
I could just find out the name of the counterpart, say, counterpart
, as per this question, and run git fetch origin counterpart:
. But, that's two commands, which may or may not be the shortest.
So, given these restrictions, what is the shortest way to accomplish this?