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
-
pain3247yYou may want to consider using --force-with-lease. I have used --force a lot too but was always a bit worried to accidentally override something. -with-lease is definitely a better choice as it checks remote changes first
-
In some git workflows, it's normal. If you always rebase your stuff, it happens a lot; if you merge everything and still pushes with force, then something might be wrong.
-
@dread-uo Yea, I’m currently taking a software engineering module in school, and as you can guess, groupmates aren’t familiar with git workflow.
So mistakes were made and git push —force was used to clean up mistakes... a shit ton of them.
The alternative would be to have half of the team repo commits be for correcting checkstyle -
You are NOT supposed to use it regardless of the workflow. It basically means: Remote server, your history is bad, take mine. In the worst case scenario you are obliterating other people's commits.
-
clstrfvck37ySounds like an issue with your git workflow more than anything else, really. I started using feature branches in my multi-person side projects and have never had to —force since.
-
How the fuck can you people use --force so regularly without feeling bad about it?
I only use it on the occasion when my boss or the intern fucks up the repo an I have to clean up the mess. 😉 -
@jclin95 just make the master branch protected so only you or some other competent person can accept merge requests on it or directly push.
-
2erXre524957ynever needed to use it either. never needed a rebase too. merge often and do decent reviews on merge/pull requests, don't let untested code going entirely through your pipeline. and then you are almost safe 😉
-
scribrock07y@vesper srsly, you never used it's full potential of screwing up things! You should try it! It's life changing!
-
I worked once with a workflow where there weren't any merge commits on git history, and we always rebased our code. I like that workflow, but it demands some care with rebasing and force pushing.
Related Rants
I feel that I'm using
git push --force
too much.
Anybody else feels this way too?
undefined
git