Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Git merge vs. rebase, when and how?
5 points by eshlomo on Nov 29, 2019 | hide | past | favorite | 2 comments



merge

- when commits of both branch need to preserve

- when additional zero file “merged commit” is ok

- when chronology order of commits need to maintain

rebase

- when commit of both need to preserve

- when zero file “merged commit” is not desired

- when rebased branch commits need to stay on top of other branch

- when change of commit id is ok


Rebase: ideally before merge.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: