2

Looking back on it, I don't understand why I used merge commit strategy as go-to to merge git branches the first +-3 years of my career. It sucks

Guess I was just afraid of rebase after I accidentally erased history the first time I used it and failed.

Comments
  • 3
    What’s wrong with merge commits? I usually squash and merge my PRs.
  • 2
    @Redd That's interesting, I never squash. I guess it's because I keep my feature branches small & rather use a single commit & git commit --amend.

    Your comment prompted me to look up and found this good article on it: https://lukemerrett.com/different-m.... I only use the fast-forward merge and the rebase and merge
  • 1
    @webketje I’ve read this article before, it’s quite interesting. The PR (and the associated branch) still contains the commit history, so even though you can’t really see the commits individually on the main branch, you can still see the commit history in a “non-squashed” way on the PR and the associated branch. It might be tedious for some, but it’s been working well for me so far.

    In the end I think it comes down to what you find works best for you and the team.
  • 1
    You do on your feature branches what u want. Then u squash merge to dev or main. Thats all u need to know
Add Comment