You're viewing a single thread.
View all comments
318
comments
The machine spirit requires that you submit the correct incantations
45 1 Replylike 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.
2 1 ReplyCan you explain what this does? I’m thinking something along the lines of reverting all commits except the very first one?
2 0 ReplyYou 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.
3 0 Reply
The thingmabob that does the job is bippity-boppity-boo.
1 0 Reply
You've viewed 318 comments.
Scroll to top