I would like to know if there's a way to tell which local branch is tracking which remote branch in Git.
I'm using one remote server, which is named "origin".
|
I would like to know if there's a way to tell which local branch is tracking which remote branch in Git. I'm using one remote server, which is named "origin".
| |||
|
feedback
|
|
Using the example of my copy of Puppet checked out from the upstream Git repository on Github.com...
Then if I were to execute the following:
And finally re-run the
| |||||||||
feedback
|
|
Jeremy Bouse illustrates how If you plan on using the information in an automated context (e.g. a script) you should use the lower-level (“plumbing”)
The | ||||
feedback
|
shows you all branches as well as the name of the upstream branch. | |||||
feedback
|
|
I use the following shell script (named
This could also use the mentioned | |||
|
feedback
|
|
Try
Otherwise, examine your | |||||
feedback
|
|
Add these runes to the
| ||||
|
feedback
|
|
For a particular branch, you can use
... or for the abbreviated form, add
You can generally use the | |||
|
feedback
|