I hereby claim:
- I am smudge on github.
- I am smudge (https://keybase.io/smudge) on keybase.
- I have a public key whose fingerprint is 06B3 1390 A506 C319 C8E0 B6D2 272E 1858 A286 E3A8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#### Delete all remote git branches | |
# Primary purpose: When you fork a repo and want a clean slate for your fork. | |
#### WARNING | |
# This is REALLY UNSAFE. Don't do this on a shared repo! | |
# Again: DO NOT DO THIS unless you're really, really sure. | |
git branch -r | grep -e "origin" | grep -v "origin/main" | awk '{sub(/origin\//,"");print}'| sed 's/^[ *]*//' | sed 's/^/git push origin :/' | bash | |
### BONUS: Delete all remote tags |
#### Switch a git repo to track a fork origin, with read-only upstream. | |
# Step 1: Press that "fork" button on github to fork a repo to your account. | |
# (Don't worry -- if it's a private repo, your fork will still be private | |
# and should be effectively owned by the original repo's organization.) | |
# Step 2: Update your local repo | |
# IMPORTANT: This assumes your local repo is a clone of the ORIGINAL/upstream repo. | |
## Add a new 'upstream' remote and add a bogus URL for push commands. |
APP_DIR=. | |
DATE=0 | |
echo "Date, Tier 1, Tier 2, Tier 3, Tier 4, Tier 5, Total" > model_counts.csv | |
for COMMIT in $(git log --first-parent --reverse --format=format:%H -- $APP_DIR); do | |
NEW_DATE=$(git show -s --format=%cs ${COMMIT}) | |
if [[ "$DATE" == "$NEW_DATE" ]]; then | |
continue | |
fi |