What's the difference between 'git merge' and 'git rebase'? -


what's difference between git merge , git rebase?

suppose there 3 commits, a,b,c:

a-b-c

then developer dan created commit d, , developer ed created commit e:

a-b-c-d-e

obviously, conflict should resolved somehow. this, there 2 ways:

merge:

a-b-c-d-e-m

both commits d , e still here, create merge commit m inherits changes both d , e. however, creates diamond shape, many people find confusing.

rebase:

a-b-c-d-e-r

we create commit r, actual file content identical of merge commit m above. but, rid of commit e, never existed (denoted dots - vanishing line). because of obliteration, e should local developer ed , should have never been pushed other repository. advantage of rebase diamond shape avoided, , history stays nice straight line - developers love that!


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -