Usually you do not invoke git merge
without arguments (at least I don’t know anyone who does). If you want that merge
defaults to the tracking branch, you need to set merge.defaultToUpstream
to true: git config merge.defaultToUpstream true
. Your master
branch has to track origin/master
in this case: git branch --set-upstream master origin/master
. This is done automagically if origin/master
was already present when you cloned.
Personally, I do git fetch
and then git merge origin/master
or git pull
if I have no local commits.
Edit: As VonC mentioned merge.defaultToUpstream
defaults to true
since Git 2.0.