0

when I set git config --global alias.pull 'pull --rebase=merges' , it seems like git pull does not do a rebase, it tells "Not possible to fast-forward, aborting".

maybe I can use another world instead of pull, but I used to using this word

Liu Hao
  • 472
  • 4
  • 24
  • have a look at https://git-scm.com/docs/git-config#Documentation/git-config.txt-pullrebase – Daniel A. White Nov 29 '22 at 02:32
  • 1
    It's unclear whether answers are supposed to address the particular issue of specifying the default pull action (which is possible without using an alias), or to explain how aliases work in general. – mkrieger1 Nov 29 '22 at 02:33
  • 2
    @mkrieger1 and either way it would be a duplicate – matt Nov 29 '22 at 02:49
  • 1
    @LiuHao : you cannot override a built in command with an alias, git prevents you from doing this. As indicated by DanielAWhite, you can set a config parameter for git pull. – LeGEC Nov 29 '22 at 03:03
  • Note that while the alias itself is ignored, the error you're getting could be due to a bug in the Git version you're using. Update and set `pull.rebase` to `merges` (`git config --global pull.rebase merges`) and the problem should go away in a current Git. – torek Nov 29 '22 at 10:26

0 Answers0