Dealing with Git: Your branch is behind ‘origin/master’ by xx commits
Jul 27
If you’re new to Git you may be working on a branch and realize that you’ve fallen out of synch with the master. In the case of Subversion you can normally do “svn up” and be good to go. In the case git you’ll normally do a “git fetch” and then a “git status” shows the following:
Your branch is behind ‘origin/master’ by 12 commits, and can be fast-forwarded.
To sync your branch with the master you can issue the following command:
git merge master
and you should now have all the latest changes from master.

You may also want to consider doing git pull –rebase… http://www.gitready.com/advanced/2009/02/11/pull-with-rebase.html has a good explanation of what it does and the difference. I like it because it avoids all the “Merged master” commits in the history.
Thanks for the awesome tip! I’ve been incredibly annoyed by the “Merged master” commit but assumed there’s nothing that could be done about it. Will give this a go.
actually, you’re already on master, so you probably need to do
git merge origin/master
(or whatever your remote is called)
@Greg is correct, you would need to merge from origin/master.
doesn’t work for me the git merge master. it will say Already up-to-date. but im still behind xx commits.