The Mijingo Blog

Latest news, updates, free tutorials, and more from Mijingo.

Preventing Fast-Forward Git Merges

by Ryan Irelan

I’ve written about why you shouldn’t use fast forward Git merges before. In short, using non-fast forward merges keeps your history complete and intact. Using the --no-ff option will prevent you from merging branches and having the child branch history get the boot.

In my PeersConf workshop recently I covered this again. My internet friend Stephen Lewis had a good solution for making sure that Git always uses non-fast forward merges.

git config --global --add merge.ff false

I just added it to my global config; please consider adding it to yours.

Filed Under: Git