𝕨𝕒𝕤𝕒𝕓𝕚@feddit.de to Programmer Humor@lemmy.mlEnglish · 10 months agoWe've all been therefeddit.deimagemessage-square16fedilinkarrow-up1290arrow-down18
arrow-up1282arrow-down1imageWe've all been therefeddit.de𝕨𝕒𝕤𝕒𝕓𝕚@feddit.de to Programmer Humor@lemmy.mlEnglish · 10 months agomessage-square16fedilink
minus-square𝕨𝕒𝕤𝕒𝕓𝕚@feddit.deOPlinkfedilinkarrow-up20·10 months agoI assume the accident was not to force push, but to the wrong branch
minus-squaremagic_lobster_party@kbin.sociallinkfedilinkarrow-up15·10 months agoI hope they learned the value of protecting your branches.
minus-squareRedscare867@lemmy.mllinkfedilinkEnglisharrow-up3·edit-210 months agoThis is why I always git push origin +branch_name
minus-squareforgeddit@sopuli.xyzlinkfedilinkarrow-up1·edit-210 months agoMy 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
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