Our team recently started using Git.
The main workflow we’re doing is simple, (as we’re not yet ninja-trained on more complex commands and workflows with it):
- Developer A commits new code (few commits).
- Developer A pushes changes to main repository.
- Developer B commits, tries to push (gets a message saying he must PULL).
- Developer B pulls, then pushes.
After some time, the repository log looks like this:

I would like to avoid this, since it makes the log pretty much unreadable, not to mention in some cases the ‘merging’ that is going on does not change any files (i can’t see any change made by it).
Are we doing something wrong in the way we work with Git? should we do it differently?
You’re not doing anything wrong, that’s just Git recording that a change was made to the repository by merging two sets of changes.
If you use
git rebasebefore pushing, orgit pull --rebasewhen pulling, then the merge commits will not be kept in the history. See http://arjanvandergaag.nl/blog/clarify-git-history-with-merge-commits.html for more.