0 votes
31 views

What is the difference between Git Merge and Git Rebase?

in Technology by (48.2k points)

1 Answer

0 votes
Suppose you are working on a new feature in a dedicated branch, and another team member updates the master branch with new commits. You can use these two functions:

Git Merge

To incorporate the new commits into your feature branch, use Git merge.

Creates an extra merge commit every time you need to incorporate changes

But, it pollutes your feature branch history

Git Merge

Git Rebase

As an alternative to merging, you can rebase the feature branch on to master.

Incorporates all the new commits in the master branch

It creates new commits for every commit in the original branch and rewrites project history
by (48.2k points)

Related questions

0 votes
1 answer 21 views
0 votes
1 answer 29 views
0 votes
1 answer 17 views
0 votes
1 answer 19 views
0 votes
1 answer 16 views
0 votes
1 answer 17 views
17 views asked Nov 2, 2020 in Technology by JackTerrance (187k points)
0 votes
1 answer 16 views
0 votes
1 answer 13 views
0 votes
1 answer 23 views
0 votes
1 answer 37 views
0 votes
1 answer 14 views
...