I\'m working with another developer on a project, and we\'re using Github as our remote repo. I\'m on a Mac using git 1.7.7.3, he\'s on Windows using git 1.7.6.
This
There is actually a much simpler answer to this. Just have developer B do a pull BEFORE making his commit. This will prevent those merge commits, since they're caused by the history you've created on your local repo from your local commit trying to merge with the history of the commits on the remote repo. If you get a message saying something along the lines of 'changes will be overwritten' when doing a pull, it just means you both touched the same file, so do:
git stash
git pull
git stash pop
then you can resolve any merge conflicts if there are any.