Skip to content

Instantly share code, notes, and snippets.

View enj's full-sized avatar
🐼

Mo Khan enj

🐼
View GitHub Profile
https://stackoverflow.com/questions/17901588/new-repo-with-copied-history-of-only-currently-tracked-files
git remote | while read -r line; do (git remote rm "$line"); done
git tag | xargs git tag -d
git branch | grep -v \* | xargs git branch -D
git stash clear
git config --local -l | grep submodule | sed -e 's/^\(submodule\.[^.]*\)\(.*\)/\1/g' | while read -r line; do (git config --local --remove-section "$line"); done
rm -rf .git/modules/
git ls-files | sed -e 's/^/"/g' -e 's/$/"/g' > keep-these.txt
@findepi
findepi / sort-commits-for-github.sh
Last active August 6, 2021 20:53
sort commits for GitHub's sake
git rebase "$(git merge-base HEAD master)" -x 'git commit --amend -C HEAD --date="$(date -R)" && sleep 1.05'
~/.../openshift/origin ∎ cat ~/.git_commit_template
#Bug ##### - Short summary of fix, symptom, or bug
#Card online_runtime_##### - Short summary of fix, symptom, or bug
#Card origin_runtime_##### - Short summary of fix, symptom, or bug
#WIP Cartridge -
#WIP Node Platform -
#!/bin/bash
oc cluster down
docker rm -f bindmountproxy