Skip to content

Instantly share code, notes, and snippets.

@pookdeveloper
Created November 10, 2023 14:38
Show Gist options
  • Save pookdeveloper/d457bf2a89565157de2e5f5ccda1d55b to your computer and use it in GitHub Desktop.
Save pookdeveloper/d457bf2a89565157de2e5f5ccda1d55b to your computer and use it in GitHub Desktop.
git nah
# Git alias ⬇️
[alias]
nah = "!f(){ git reset --hard; git clean -df; if [ -d ".git/rebase-apply" ] || [ -d ".git/rebase-merge" ]; then git rebase --abort; fi; }; f"
# Bash function ⬇️
nah () {
git reset --hard
git clean -df
if [ -d ".git/rebase-apply" ] || [ -d ".git/rebase-merge" ]; then
git rebase --abort
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment