this post was submitted on 25 Oct 2023
182 points (100.0% liked)
Programmer Humor
853 readers
11 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How do you accidentally force push lol
I assume the accident was not to force push, but to the wrong branch
I hope they learned the value of protecting your branches.
This is why I always
git push origin +branch_name
My go-to these days is to push the current branch, dynamically.
git push origin HEAD
Depending on the VC, HEAD has different prefix/suffixes to make it work.
Edit: formatting, also I never checkout master I do origin/master so I cannot even push it with this method. I think