fast-forward only [git]

tl;dr git config --global pull.ff only makes git pull happy. 🌟

I just set up a new computer and, every time I ran git pull, I was greeted with a message I had not seen before:

Pulling without specifying how to reconcile divergent branches is discouraged. You can squelch this message by running one of the following commands sometime before your next pull:

git config pull.rebase false  # merge (the default strategy)
git config pull.rebase true   # rebase
git config pull.ff only       # fast-forward only

You can replace "git config" with "git config --global" to set a default preference for all repositories. You can also pass --rebase, --no-rebase, or --ff-only on the command line to override the configured default per invocation.

Looking further into it, I found several recommendations to set the global configuration to be pull.ff or “fast-forward only.” The gist is that you’ll save yourself some merge commit headaches and instead it will only pull if it can be fast-forwarded.

Speak your mind

This site uses Akismet to reduce spam. Learn how your comment data is processed.