Why is that git pull
pulls everything including newly created remote branches but git pull origin master
does not?
I\'m using git ver
Its is really simple
When you say git pull
everything irrespective of any hooks and filter gets added to your local. In short you get everything from your remote and update the .git
folder. You can go to folder .git/logs/refs/remotes/origin/
you will see the branches all that you have on your local.
So, Now I typed git pull
from my cmd.
What happen behind the curtain is irrespective of the local branches you have. It hooks up the origin and get every from there to your local.
But, when I type git pull origin master
. In this you give a path specification from origin you need a latest head of master branch. Then only master brach gets pulled and refreshed as it is on remote
So, origin master
is a path spec they called in git language for path.