Skip to content

Instantly share code, notes, and snippets.

@pookdeveloper
Created November 10, 2023 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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