3 ms·
This has saved me: git config --global pull.ff only I can always override an individual pull invocation with either "git pull --rebase" or "git pull --no
by gsylvie 10y ago
This has saved me:
git config --global pull.ff only
I can always override an individual pull invocation with either "git pull --rebase" or "git pull --no-ff", making it a conscious choice when a fast-forward pull is not possible.
- gsylvie 10y agop.s. If you set this config, and a fast-forward pull is not possible, here is what git does: $ git pull fatal: Not possible to fast-forward, aborting.
- ninkendo 10y agoOh wow, this must be a recent feature, I remember looking for a way to configure `--ff-only` by default a few years ago and it didn't seem possible. I ended up making a git alias of `git puff` which calls pull with the `--ff-only` flag.
- gsylvie 10y agoLooks like it showed up with commit b814da891e, and has been around since Git v2.0.0. The online docs mention it in Git v2.1.0: https://git-scm.com/docs/git-config/2.1.0 https://git-scm.com/docs/git-config/2.1.0