According to the documentation, git pull performs a git fetch then a git merge, however in that case performing git pull origin master should perform a git fetch origin master right? However, it does not appear to be doing so. Here is an example.
Supposed my remote origin master (on GitHub in my case) has the following history:
commit 1111111 : my first commit
commit 2222222 : a commit from someone else
and I only have my first commit locally as doing following shows
git checkout master
git log --pretty=format:'%h' -n 1
1111111
git checkout origin/master
git log --pretty=format:'%h' -n 1
1111111
From here I do my pull and look at the results as follows:
git checkout master
git pull origin master
git log --pretty=format:'%h' -n 1
2222222
git checkout origin/master
git log --pretty=format:'%h' -n 1
1111111
As can be seen, the pull did in fact update my master branch with the new commit(s) from the remote origin, but my local origin/master is still where it was. Forcing me to do the following
git fetch origin master
git checkout origin/master
git log --pretty=format:'%h' -n 1
2222222
Is this correct behavior for git pull or might I have something miss configured? I looked through the git pull man page and didn't see anything that suggested this but I may have missed it.