Files
30-seconds-of-code/snippets/git/s/disable-fast-forward.md
2023-05-07 16:07:29 +03:00

641 B

title, type, language, tags, author, cover, dateModified
title type language tags author cover dateModified
Disable fast forward merging by default snippet git
configuration
repository
chalarangelo people-on-beach 2021-07-03T05:00:00-04:00

Disables the default fast forwarding on merge commits.

  • Use git config --add merge.ff false to disable fast-forward merging for all branches, even if it is possible.
  • You can use the --global flag to configure this option globally.
git config [--global] --add merge.ff false
git config --global --add merge.ff false

git checkout master
git merge my-branch
# Will never fast forward even if it's possible