Just do IT

思うは招く

git pull をすると出る warning: Pulling without specifying how to reconcile divergent branches is discouraged の対処

$ git pull

をすると以下の警告が出る。

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

正確には「出ていた」のだけど、ずっと放置していて「そろそろ対応するか」と重い腰を上げた。

警告の内容、対処法は以下の記事で詳しく説明されている。

Git 2.27.0 から git pull をすると表示されるようになった "Pulling without specifying how to reconcile divergent branches is discouraged." について - esm アジャイル事業部 開発者ブログ

個人的には、rebaseは明示的に実行したいので以下の設定をしておいた。

--globalをつけてグローバル設定にする。

$ git config --global pull.rebase false