Unlike e.g. git push
, git merge
does not take the name of a remote as an argument, so when you say git merge origin master
you're actually saying "do an octopus merge from the 'origin' and 'master' branches". What you should've run is this:
git merge origin/master
Apparently you have a branch named "origin". Should it be there, or did you create it by mistake?
I'm not sure why you get inconsistent behavior between git merge origin master
and git merge --ff-only origin master
, but that doesn't really matter.