git nuke
Nov 20, 2023
Clean up my git repo and blow away all changes
As a windows batch file
gitnuke.bat
git clean -dfGet Geoff McCarron-Benson’s stories in your inbox
Join Medium for free to get updates from this writer.
git reset --hard
if exist .git/rebase-apply (
git rebase --abort
)
if exist .git/rebase-merge (
git rebase batch--abort
)
git status
git pull
As a git alias
~/.gitconfig
[alias]
nuke = "!f(){ git reset --hard; git clean -df; if [ -d ".git/rebase-apply" ] || [ -d ".git/rebase-merge" ]; then git rebase --abort; fi; git status; git pull; }; f"




