跳至主要内容

博文

目前显示的是 五月, 2021的博文

Git warning: Pulling without specifying how to reconcile divergent branches is discouraged

 原文链接 As of Git version  2.27.0  running the command  git pull  will display the following message unless your Git configuration includes certain settings. warning: Pulling without specifying how to reconcile divergent branches is discouraged. You can squelch this message by running one of the following commands sometime before your next pull: git config pull.rebase false # merge (the default strategy) git config pull.rebase true # rebase git config pull.ff only # fast-forward only You can replace "git config" with "git config --global" to set a default preference for all repositories. You can also pass --rebase, --no-rebase, or --ff-only on the command line to override the configured default per invocation. Short Explanation Git wants us to choose how it should handle the situation where our remote branch (e.g.  origin/develop ) is out of sync with our local branch ( develop ). Many people (myself included) feel the default way Git histori...