Create a Git Alias
You can create a global git aliases like this:
$ git config --global alias.delete-untracked '!f() { (echo "";echo "THE FOLLOWING FILES WILL BE DELETED:";git clean -f --dry-run; echo "";echo "ARE YOU SURE? (CTRL+C TO ABORT --OR-- ENTER TO CONTINUE...)";read x; echo "";echo "THE FOLLOWING DIRECTORIES WILL BE REMOVED:";git clean -f -d --dry-run; echo "";echo "ARE YOU SURE? (CTRL+C TO ABORT --OR-- ENTER TO CONTINUE...)";read x;set -x;git clean -f; git clean -f -d); }; f'
See reference link below for more handy git aliases.
No comments:
Post a Comment