Remix.run Logo
mr_mitm 8 hours ago

You can always force-push a cleaned up version of your branch when you are ready for review, or start a new one and delete the WIP one.

croemer 7 hours ago | parent | next [-]

You can, but instead you can also just squash merge in one click. And avoid that people merge there dozens of fixes if you allow anything but squash merge.

theshrike79 7 hours ago | parent | prev [-]

I hate (and fear) force-pushing and "cleaning up" git history as much as other people dislike squash-merging =)

It just feels wrong to force push, destroying stuff that used to be there.

And I don't have the time or energy to bisect through my shitty PR commits and combine them into something clean looking - I can just squash instead.

seba_dos1 7 hours ago | parent [-]

Nothing is destroyed by a force push. It just overwrites a single pointer, and even keeps its old value in reflog.

Things that aren't referenced by anything anymore will eventually get garbage collected and actually destroyed, but you can just keep a reference somewhere to prevent that from happening if you need. Or even disable garbage collection completely.

Looks like people's fears about git come just from not knowing what it does.

Noumenon72 4 hours ago | parent [-]

You can't use the remote reflog to revert what you force pushed, can you? But I agree that having your local reflog means you're never totally lost. I still just make a branch before major edits so I can go back.