lemmyreader@lemmy.ml to Linux@lemmy.mlEnglish · edit-28 months agoa git cheat sheet - Julia Evanscdn.masto.hostimagemessage-square39fedilinkarrow-up1505arrow-down110file-textcross-posted to: linuxfr@jlai.luopensource@lemmy.ml
arrow-up1495arrow-down1imagea git cheat sheet - Julia Evanscdn.masto.hostlemmyreader@lemmy.ml to Linux@lemmy.mlEnglish · edit-28 months agomessage-square39fedilinkfile-textcross-posted to: linuxfr@jlai.luopensource@lemmy.ml
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up1·edit-28 months agoUnless you’re rebasing or something, you should never need --force. It’s a good way to accidentally delete or overwrite a remote branch. I usually use the +syntax for force-pushing a specific branch: git push origin +my_branch
minus-squareBenaaasaaas@lemmy.worldlinkfedilinkarrow-up1·8 months agoI thought -a is shorthand to amend my bad
Unless you’re rebasing or something, you should never need
--force
. It’s a good way to accidentally delete or overwrite a remote branch.I usually use the +syntax for force-pushing a specific branch:
git push origin +my_branch
I thought
-a
is shorthand to amend my bad