Hacker News new | ask | show | jobs
by aanthracite 1460 days ago
Just avoid rebase and --amend and you will be fine.

Your commit log won't be perfect, but also you won't waste your time fixing conflicts and other issues...

1 comments

You're just delaying the conflict resolution to when you actually want to merge the branch back in...
You're delaying it to a one-time pain rather than for every commit in your rebase. I've stopped rebasing altogether and it's much more manageable.
Problem is there are open source projects where PRs with multiple commits are not allowed. Not much choice but to rebase in that case. I struggled with it a lot at first but haven't had any issues more recently. But personally I'd rather not use it, and don't on other repos I work on. Btw I'd say if you've never had issues with git it's because you've never been forced to do a shallow clone (due to networking issues) or run out of disk space while using it. Had to blow away and reclone repos many times in both cases, but only after hours struggling with cryptic and unpredictable error messages.
That's really interesting, if PR's aren't allowed to have multiple commits then why not just enforce squash-and-merge for all PR's? Then it doesn't matter what you do on your local branch, because when the PR is merged it's squashed into a single commit.
Exactly what I argued, but it wasn't my call to make...