Hacker News new | ask | show | jobs
by _hao 1609 days ago
Why not create a new branch (let's call it B) from your messy branch (call it A) and squash everything in B before raising a PR from B -> master

That will solve your problems if you're the messy type.

1 comments

Sure, that’s exactly what I’m advocating for? I’m confused.

You said it’s a waste of time to do this and to just squash when merging instead. I’m saying I’d rather squash first so that my PR looks clean and doesn’t contain my WIP commits. Then you respond saying “well you can just squash before your PR then”… are we going in circles?

Your use case is a bit different than what the article is arguing for. If you have a personal preference to have everything shown as a single commit in the PR by all means do things the way outlined above.

My original comment was targeting the two supposed problems that the article is framing and the supposed convoluted (and possibly dangerous) solution with git reset.