![]() If an untracked directory is managed by a different Git repository, it is not removed by default. Remove untracked directories in addition to untracked files. This is the online help text for the used git clean options: # ERASE changes in tracked files (in the current directory) # REMOVE ignored/untracked files (in the current directory) # dry-run to inspect the list of files-to-be-removed Since no answer suggests the exact option combination that I use, here it is: git clean -dxn. So Mariusz Nowak's answer still applies and if you want to discard all unstaged changes, including untracked files, you could run, as he suggests, an additional git clean -df. , this only discards changes in tracked files.
0 Comments
Leave a Reply. |