lemmyreader@lemmy.ml to Linux@lemmy.mlEnglish · edit-21 年前a git cheat sheet - Julia Evanscdn.masto.hostimagemessage-square31linkfedilinkarrow-up1501arrow-down18file-textcross-posted to: [email protected]
arrow-up1493arrow-down1imagea git cheat sheet - Julia Evanscdn.masto.hostlemmyreader@lemmy.ml to Linux@lemmy.mlEnglish · edit-21 年前message-square31linkfedilinkfile-textcross-posted to: [email protected]
minus-square𝘋𝘪𝘳𝘬@lemmy.mllinkfedilinkarrow-up14arrow-down1·1 年前tl;dr git add . git commit -a git push
minus-squarexthexder@l.sw0.comlinkfedilinkarrow-up1·edit-21 年前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
minus-squareBenaaasaaas@lemmy.worldlinkfedilinkarrow-up1·1 年前I 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