Created
May 26, 2017 21:16
-
-
Save pfrozi/822e62df144fe39518ea55da3da2ca36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git reset --hard # removes staged and working directory changes | |
## !! be very careful with these !! | |
## you may end up deleting what you don't want to | |
## read comments and manual. | |
git clean -f -d # remove untracked | |
git clean -f -x -d # CAUTION: as above but removes ignored files like config. | |
git clean -fxd :/ # CAUTION: as above, but cleans untracked and ignored files through the entire repo (without :/, the operation affects only the current directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment