lemmyreader@lemmy.ml to Linux@lemmy.mlEnglish · edit-27 months agoa git cheat sheet - Julia Evanscdn.masto.hostimagemessage-square38fedilinkarrow-up1492arrow-down110file-textcross-posted to: opensource@lemmy.ml
arrow-up1482arrow-down1imagea git cheat sheet - Julia Evanscdn.masto.hostlemmyreader@lemmy.ml to Linux@lemmy.mlEnglish · edit-27 months agomessage-square38fedilinkfile-textcross-posted to: opensource@lemmy.ml
minus-square𝘋𝘪𝘳𝘬@lemmy.mllinkfedilinkarrow-up13arrow-down1·7 months agotl;dr git add . git commit -a git push
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up1·edit-27 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·7 months agoI thought -a is shorthand to amend my bad
tl;dr
You dropped
--force
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