Configure `git pull` to use -ff and` git merge` to use --no-ff

I would like git mergeto use --no-ffand git pulluse by default --ffwhen it merges the extracted branch.

Is there any way to configure git for this automatically?

+4
source share
2 answers

I would suggest installing merge.ff=falseand using git pull --rebaseto get new changes.

If you do not have local commits, it will give the same result as git pull, but without merging.

If you have some local commits, it will reinstall them, avoiding the usually unwanted merge commit.

, , , .

+4

Git 2.0 merge.ff=false pull.ff=only .

0

All Articles