Reputation: 7519
This is the git-sh
output of branch -a
:
What does the right arrow ->
mean here?
Does it have anything to do with tracking?
(From what I know, the red branches are read-only branches from the remote repo.
I understand that a branch I create in my local GIT repository must be configured to track a specific branch on a remote GIT (so that commands like pull
can work without specifying the remote branch).
I know that in this repo the only tracking that should be configured is the tracking of my local master to the origin's master. )
Upvotes: 5
Views: 1358
Reputation: 7519
The arrow is just a symbolic ref, showing a layer of indirection between remote origin/HEAD
branch and remote origin/master
branch.
In order to see tracking you need to add a flag to trigger a higher level of verbosity. Here's the output of the same command with the -vv
flag.
The -vv flag adds verbosity to the output about each branch. Consider the line for the master branch. It now gives the SHA-1 hash of the head commit for the branch, and then, in brackets, it tells us the remote branch that the master branch is tracking -- origin/master
. This tracking was established by git when we cloned our local repo; master is the only branch for which tracking is auto configured.
Next, I also configured my local bDev
branch to track the branch of the same name on the origin
remote. Note, it's not necessary that the local and tracked remote branch have the same name, but it's common.
Upvotes: 3