DEV Community

Discussion on: There Is No "Right" Way: Git Rebase vs Merge

Collapse
 
rranslam profile image
Rob Ranslam

The real argument is about what history is and how to preserve it. It's NOT the minutiae; It's the narrative of what the commit does when applied. So rebase -i to craft that narrative! Or git commit --amends. Remember that git is collaboration tool too.

Keeping a history littered with 'add new comment'-like goo should be squashed and never be in Master. Also, It's almost pointless to merge a single squashed commit to master.

So, If you're pro Master branch merge commits, it best to have a crystal clear rational/strategy as to why you need to keep and share that commit history as the product dev proceeds. Otherwise it's goo.

I'm for a linear history with rare merge commits.