I’m used to using git, and this is the first time I get this error that I don’t understand.
After a fresh clone on Linux
# git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Even if I know that all is updated :
# git pull
error: preserve: 'preserve' superseded by 'merges'
fatal: invalid value for 'pull.rebase': 'preserve'
#
# git --version
git version 2.37.1
#
Why this ?
2
Answers
There was a
/etc/gitconfig
not linked to the git package, I can't know its origin I removed itTry
git config --list --show-origin --show-scope
In ubuntu 22.04 a newer version of git deprecated "pull.rebase=preserve"
Git typically has config:
/etc/gitconfig
/home/<username>/.gitconfig
.git/config
of the repo you are inI suspect the repo you are in has the old settings so you can run:
git config --local pull.rebase merges
or if you see it in system or global modify the above command to the correct scope.