Created
September 13, 2017 18:36
-
-
Save leodutra/b9867f1e910591e8014fbf6e2683e8fa to your computer and use it in GitHub Desktop.
Git always merge with --no-ff (non fast-foward)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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