I would like to know if git pull will update all my branches or just the master branch?
Or
Does it just pull the current branch I am working in?
It just updates the currently checked out branch.
More specific: it will fetch
all the branches (= update the origin/*
branches), and then merge the matching remote branch into the currently checked out branch. So if you’re in master
, git pull
is equivalent to:
git fetch
git merge origin/master
If you want to pull all the branches, have a look at this question: Can "git pull --all" update all my local branches?
trygit pull --help
Incorporates changes from a remote repository into the current branch. In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD.