Created
August 17, 2022 03:02
-
-
Save paxan/2f6083fd36190ec59f1943f02fa86c6e to your computer and use it in GitHub Desktop.
~/.gitconfig
This file contains 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
[pull] | |
ff = only | |
[merge] | |
ff = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These settings configure pull and merge commands to be safer when working on feature branches.
Use these commands to add them to your global Git config:
The
merge.ff=false
ensures that when you merge a feature branch to your production branch (e.g.main
), you will be creating a proper merge commit: the editor will be shown, allowing you to add some extra details.The
pull.ff=only
ensures that Git won't create a nuisance merge commit when it sees that your local feature branch diverged from the remote feature branch.