2
msdsk
1y

That sudden realization that you REALLY need to do git push -f, always nice.

Comments
  • 2
    ... rejected by administrative settings for all non feature branches by default.
  • 1
    @IntrusionCM I'm glad my company doesn't follow best practices. Wait...
  • 2
    @msdsk ... Yep.

    If you rewrite the history of a versioned branch, e.g. one containing tags or commits referencing specific CI builds for versioned distributioning....

    Then that is royally fucked afterwards.

    History rewrite means exactly that.

    When you then have to bisect a regression, try to blame a commit or sth like that... Well. The history is a lie.

    References to commits are a lie, commits don't even have to exist anymore - in a nutshell, you broke a foreign key.

    Which is why git push with force is almost *always* a bad idea.

    Unless you really wanna jinx yourself for eternity.
  • 1
    @IntrusionCM

    Fortunately it was a feature branch and it will get squashed before getting merged... but yeah, I really had to make sure that some commits just didn't exist anymore if you catch my drift.
  • 1
    @msdsk then it's fine.... As long as feature isn't tied to versioning.

    After all, that's what branches are for.
  • 1
    @TheCommoner282 yep git commit -m “ITS FRIDAY FUCK CODE” —no-verify git push -f
  • 1
    So did you push your credentials or comments attacking your coworkers? Or did you just write disgusting spaghetti code?
  • 3
    @electrineer
    I refuse to answer without a lawyer present.
  • 1
    I force-push a lot (likely more than not-force-pushing), but then I like my branches properly rebased. This goes for my own development branches obviously, never main / release branches.
Add Comment