What does git config pull.rebase false do?

ask:

What does git config pull.rebase false do?

answer:

git config pull.rebase falseThe function is to set Git git pullto use merge instead of rebase by default when executing the command. git pullThe command is to merge the updates from the remote branch to the local branch. If there are updates to the local branch, the merge operation will be automatically performed. By default, git pullthe command will use rebase to merge branches. The advantage of using rebase is that it can keep the submission history linear and avoid the branch merge records generated by merge. However, if rebase is used in a multi-person collaboration project, it may destroy the submission history and cause code conflicts, so it needs to be used with caution. Through settings git config pull.rebase false, Git will use merge by default to merge branches, thus avoiding potential problems caused by rebase. It should be noted that if the option git pullis specified when executing the command --rebase, Git will preferentially use rebase to merge branches, regardless of git config pull.rebasethe setting of. Therefore, if you need to force the merge method to merge branches, you can git pulladd --no-rebasethe option when executing the command.

Guess you like

Origin blog.csdn.net/kuang_nu/article/details/129592235