Skip to content

Instantly share code, notes, and snippets.

View dccarroll's full-sized avatar

Dan Carroll dccarroll

View GitHub Profile
@brandur
brandur / force-reset.md
Last active January 3, 2022 16:07
Force pull request's diff to reset itself against target branch

Force pull request's diff to reset itself against target branch

git checkout feature-branch
# empty commit; don't worry, this will not show up in the final pull
git commit --allow-empty -m "Empty commit"
git push origin feature-branch
# hard reset to before empty commit
git reset --hard HEAD~
git push -f origin feature-branch
@raylu
raylu / Makefile
Last active November 9, 2019 12:39
Go question
go: go.c
gcc -o go -O go.c -Wall -Wextra -std=c11 -ggdb