Pulling without specifying how to reconcile divergent branches

Since version 2.27.0, when running the git pull command, a notification of the following character appears:
“Warning: Pulling without specifying how to reconcile divergent branches is
discouraged ”

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.

Git decided that the user should now know that he can determine the method of merging changes for himself if the remote branch is updated. Previously, when pulling in changes, the git would automatically merge the branch.

You can choose one of three teams. Leaving as default means entering:

git config pull.rebase false

Or change the merge mode to something like this:

To remove notifications for all repositories, add the global attribute:

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *