LinearArray@programming.dev to Programmer Humor@programming.devEnglish · 9 months agoHey, I'm new to GitHub!programming.devimagemessage-square318fedilinkarrow-up11.27Karrow-down121
arrow-up11.25Karrow-down1imageHey, I'm new to GitHub!programming.devLinearArray@programming.dev to Programmer Humor@programming.devEnglish · 9 months agomessage-square318fedilink
minus-squareMoghul@lemmy.worldlinkfedilinkarrow-up45arrow-down1·9 months agoThe machine spirit requires that you submit the correct incantations
minus-squareNo_Eponym@lemmy.calinkfedilinkarrow-up1·9 months agoThe thingmabob that does the job is bippity-boppity-boo.
minus-squareEkky@sopuli.xyzlinkfedilinkEnglisharrow-up2arrow-down1·edit-29 months agolike this? # Let Git take a rest with some yummy awk chocolate logs with delicious nuts and seeds, and don't be pushy! git reset --hard $(git log --reverse | sed -n 1p | awk -F "[ ]" '{print $2}') && git push -f EDIT: Don’t actually run it.
minus-squaresubtext@lemmy.worldlinkfedilinkarrow-up2·9 months agoCan you explain what this does? I’m thinking something along the lines of reverting all commits except the very first one?
minus-squareEkky@sopuli.xyzlinkfedilinkarrow-up3·9 months agoYou are correct! It sets HEAD to the first commit and then force pushes, deleting everything after HEAD. Though, it only affects the currently selected branch.
The machine spirit requires that you submit the correct incantations
The thingmabob that does the job is bippity-boppity-boo.
like this?
# Let Git take a rest with some yummy awk chocolate logs with delicious nuts and seeds, and don't be pushy! git reset --hard $(git log --reverse | sed -n 1p | awk -F "[ ]" '{print $2}') && git push -f
EDIT: Don’t actually run it.
Can you explain what this does? I’m thinking something along the lines of reverting all commits except the very first one?
You are correct! It sets HEAD to the first commit and then force pushes, deleting everything after HEAD.
Though, it only affects the currently selected branch.