How to configure “git pull --ff-only” and “git merge --no-ff”

前端 未结 1 1484
粉色の甜心
粉色の甜心 2021-02-07 00:43

A typical git workflow for me is to clone a remote repository and use git pull to keep it up-to-date. I don\'t want merge commits when I pull, so i use the --ff-only option.

相关标签:
1条回答
  • 2021-02-07 01:23

    That shouldn't be the case, according to the git-config man page on pull.ff:

    (...) When set to only, only such fast-forward merges are allowed (equivalent to giving the --ff-only option from the command line). This setting overrides merge.ff when pulling.

    The configuration pull.ff has been introduced in Git 2.x, so it won't work as expected on Git 1.x -- it will probably pick up the merge.ff configuration and use that when doing a Pull.

    0 讨论(0)
提交回复
热议问题