0 votes
1 view
in Devops and Agile by (29k points)

How can I find out which remote branch a local branch is tracking?

Do I need to parse git config output, or is there a command that would do this for me?

1 Answer

0 votes
by (49.5k points)

There is a command that gives you about all tracking branches.

git branch -vv

And to know about the pull and push configuration per branch you can use the command git remote show origin.

In git version 1.8.5 you can see the upstream batch with:

git status

and you can use -sb option for seeing the upstream.

Hope this information will help you to find which branch is tracking.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...