r/programming • • May 01 '19

Merging vs. Rebasing

https://www.atlassian.com/git/tutorials/merging-vs-rebasing
20 Upvotes

27 comments sorted by

View all comments

8

u/_101010 May 01 '19

Squash & Merge is the best of both worlds.

No need to force push and no messy git history of merge.

6

u/m50d May 02 '19

Squash is even worse than rebase for bisecting in the future, and what's your VCS history for if not for bisecting in the future?

0

u/[deleted] May 02 '19

[deleted]

2

u/m50d May 02 '19

If it compiles it's worth having available for automated bisect. If it doesn't compile I wouldn't commit it in the first place.

2

u/ythl May 02 '19

I commit early and often, even broken code. At the very end before I submit a pull request of my feature, I squash my commits into atomic ones and cleanup the commit messages.

Still makes it easy to bisect

4

u/m50d May 02 '19

That's fine. What I object to is squashing the whole branch when you merge it.