Question-- when using a long-lived feature branch, do you merge development (causing merge commits) or do you rebase (rewriting the Git history and then having to force push)
And if doing the latter, I'm curious how you handle a team of people on that branch when rebasing. It seems quite disruptive to me when all of a sudden someone else rebases the feature branch and my Git client tells me I have 50 unpushed commits that I have to roll back with
git reset
and then re-pull all the "new" commits.
b
bdw429s
08/12/2024, 5:53 PM
And corollary (but separate) question. How many of you squash commits before merging vs just keeping the full commit history. I've never understood the aversion to separate commmits-- to me, it shows the rich history of how and when the code was written, by whom, and when, etc. Squashing just throws all that information away for no real gain. (Fewer commits isn't "cleaner" to me, it's just devoid of all the useful history and information that I use source control for in the first place!)