Created
March 4, 2017 07:43
-
-
Save fukurouzhong/249cff8b363f9ff31144cc216f669f07 to your computer and use it in GitHub Desktop.
How to delete untracked files in git
This file contains 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
# delete untracked files | |
git clean -f | |
# delete untracked files as well as the directories | |
git clean -fd | |
# including gitignore file/directories (慎用,一般这个是用来删掉编译出来的 .o之类的文件用的) | |
git clean -xfd | |
# before using git clean,with -n parameter to preview the files or directories will be deleted | |
git clean -nxfd | |
git clean -nf | |
git clean -nfd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment