Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (29.3k 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 (50.2k 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!

28.4k questions

29.7k answers

500 comments

94k users

Browse Categories

...