Git fetch and Git pull

After git pull, the code merges into a local branch. Git fetch ignores the merge operation, so simply put:

git pull = git fetch + git merge
Copy the code

Git pull differs from git pull

Git pull contains a merge parameter by default, so the difference between merge and rebase is the same.

merge

mergeA new COMMIT is created. If a conflict occurs during merge, resolve the conflict and re-commit.

rebase

rebaseThe two branches are merged, along with the previous COMMIT history. If a conflict occurs, run the following command after the conflict is resolved:

git add
git rebase --continue
Copy the code

Git Rebase git rebase git Rebase Git Rebase Git Rebase Git Rebase Git Rebase Git Rebase Git Rebase Git Rebase Git Merge

Quote from: www.jianshu.com/p/f23f72251…