Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4669025yWe work in forks, separating the master repo and branches away from the devs, you can only merge to the master repo from a reviewed PR.
They can do anything they like to their fork, delete it if they want for all I care. It's easier to fix a devs form then it is to fix the main repo.
This flow has its own issues like visibility and conflict resolution, but you know the master repo is protected from idiots. -
@nitwhiz we use GitHub and yes that's what protected branches are for. You could easily wildcard protect any branch, but I was asking If anyone had other ideas 😋
-
@C0D4 so basically the Open source approach? I feel it would slow down tremendously at first until everyone would get the hang of it but I like the idea
-
you hire Linus Torvalds and if some idiot tries funny stuff like git push mirorr he will insult the idiot that much that he never dares to do funny stuff again 😆
-
Do not restrict anyone from doing whatever with their own feature branches. If you do, you loose the backup capabilities of git, as people will only push once they have something to publish.
Related Rants
How do you protect your team's git remotes?
We tend to protect the master and stage branch from force pushing and only allow merging pull requests after successfull recent tests and successfull review by someone with proper permissions. Depending on the project the Dev branch is only protected from force pushing though. All other branches are free to handle however wanted.
We recently had someone do a "git push -f --mirror" without understanding the command. Quick reminder what that does: it mirrors all your local branches to the remote so that the remote will be a mirror of your local repo. Branches that exist on remote but not on your machine will be removed from the remote.
A then needed to work from B's feature branch but of course that was gone... So while the idiot didn't fuck up our protected branches he still fucked over other people's workflow with that.
Is there an alternative to outright blocking force pushes which could have prevented that (except force pushing intelligence into his brain)?
question
mirror
git
git -f
force push