[FIXED] git pull : error: preserve: 'preserve' superseded by 'merges' fatal: invalid value for 'pull.rebase': 'preserve'


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 ?


There was a /etc/gitconfig not linked to the git package, I can’t know its origin
I removed it

  sts = status -s
  st = status -sb
  cl = clone
  ci = commit
  ca = commit --amend
  filelog = log -u
  fl = log -u

  cp = cherry-pick
  co = checkout
  unstage = reset HEAD
  precommit = diff --cached --diff-algorithm=minimal -w

  pushf = push --force-with-lease

  br = branch
  bra = branch -ra

  #list commands
  tip = log -n 1 --abbrev-commit --decorate
  lol = log --graph --decorate --pretty=oneline --abbrev-commit
  lola = log --graph --decorate --pretty='format:%C(auto)%h %C(cyan)[%ar]%C(auto)%d %C(yellow)%ae %Creset%s' --abbrev-commit --all
  tig = log --graph --boundary --left-right --cherry-pick --decorate HEAD...FETCH_HEAD
  ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat

  #list all aliases
  la = "!git config -l | grep alias | cut -c 7-"
  #list modified files in last commit
  dl = "!git ll -1"

  #diff last commit
  dlc = diff --cached HEAD^
  dr  = "!f() { git diff -w "$1"^.."$1"; }; f"
  diffr  = "!f() { git diff "$1"^.."$1"; }; f"
  dw = diff --word-diff
  dcw = diff --color-words
  dcwr = diff --color-word=.

  r = reset
  r1 = reset HEAD^
  r2 = reset HEAD^^
  rh = reset --hard
  rh1 = reset HEAD^ --hard
  rh2 = reset HEAD^^ --hard
  nevermind = !git reset --hard HEAD && git clean -d -f

  sl = stash list
  stashes = stash list
  sa = stash apply
  ss = stash save
  sp = stash pop

  last = log -1 --stat
  lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=re
lative --all

  tool = kdiff3

[mergetool "kdiff3"]
  trustExitCode = False

  guitool = kdiff3

[difftool "kdiff3"]
  trustExitCode = False

  autocrlf = input
  trustctime = false
  editor = vim
  filemode = false
  eof = lf
  default = upstream
  rebase = preserve

  helper = cache --timeout 36000

Answered By – troubadour

Answer Checked By – Dawn Plyler (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published