Difference between remote validation branch and remote branch output in git?

What's the difference between:

git checkout -b <branch> origin/<branch>

and

git pull origin <branch>

They seem to have the same functionality. thank.

+4
source share
1 answer

git pullcontacts the remote repository identified originand looks for updates. It extracts any updates and then merges the changes into the target branch. It does not create a new branch.

git checkout -b <branch> origin/<branch>creates a new branch based on origin/<branch>and does not bind to the remote repository. It looks at origin/<branch>, as it currently exists in your local repository.

; git-pull git-checkout , .

+7

All Articles