Home > Article > Development Tools > What is the difference between git rebase and merge?
merge and rebase
The two commands on the title: merge and rebase are both used to merge branches.
The rebase command and the principles of the two commands are not explained here. For detailed explanation, please refer here.
The following content mainly talks about the difference between the two in actual operation.What is a branch
Branch is to facilitate the collaborative development of multiple people in the same project. For example: Everyone develops different functions without affecting each other during the development process of their respective branches. After completion, they are submitted to the develop branch. Greatly improves development efficiency.Merge branches
Everyone creates a branch for development. When the development is completed and needs to be merged into the develop branch, the merge command needs to be used.What is a conflict
When merging, conflicts may occur. Conflicts occur because different branches modify the same location during merging. So when merging, git doesn't know which one you want to keep, so it raises a question (conflict reminder) and lets you manually select what you want to keep to resolve the conflict.The difference between merge and rebase
1. The difference between git log after using merge and rebase. The merge command will not retain the commit of the merged branch:2. How to deal with conflicts:
Git Tutorial"
The above is the detailed content of What is the difference between git rebase and merge?. For more information, please follow other related articles on the PHP Chinese website!