3 ms·
Why would you have to force anything with rebase? you rebase your feature branch against main to rewind it on top of it and clean up history so you can do a cle
by aulin 4y ago
Why would you have to force anything with rebase? you rebase your feature branch against main to rewind it on top of it and clean up history so you can do a clean fast forward merge. Squashing is bad for anything non trivial, you want small independent commits: easy to review, easy to revert, easy to blame if something goes wrong.
- G3rn0ti 4y agoAs soon as you pushed your branch to remote (which I tend to do for backup reasons especially after working hard on a solution) rebase only means trouble.
- aulin 4y agoif you're the only one working on that branch I don't see where is the problem in rewriting history and force pushing
- mixmastamyk 4y agoUntil you make a mistake.
- eru 4y agoWhy? That's what 'git reflog' is for. Or you mean that a mistake where you accidentally push to someone else's branch? The default model that public github uses is good for that: everyone works on their own fork of the repo, and makes pull requests to the shared repo. Nobody pushes directly to the shared repo.
- mixmastamyk 4y agoSecond. Github not an option for a lot/most work.
- __blockcipher__ 4y agoNot if it's the remote for your own dev branch. It only matters if the remote branch is being (actively) used by other people. Unfortunately I've met far too many who have your "remote" superstition. I remember arguing this exact point in my last gig, when someone was mad at me for force pushing my own remote branch that nobody else was using nor should have been.