Skip to content

Instantly share code, notes, and snippets.

@leodutra
Created September 13, 2017 18:36
Show Gist options
  • Select an option

  • Save leodutra/b9867f1e910591e8014fbf6e2683e8fa to your computer and use it in GitHub Desktop.

Select an option

Save leodutra/b9867f1e910591e8014fbf6e2683e8fa to your computer and use it in GitHub Desktop.
Git always merge with --no-ff (non fast-foward)
#!/bin/sh
git config --global merge.ff no
git config --global merge.commit no
# However, the problem with this is that git pull = git fetch + git merge.
# So whenever you pull from the remote server,
# you'd be creating an ugly merge commit when
# a simple fast-forward would be warranted.
# To solve this, set pull.ff to yes:
git config --global pull.ff yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment