How do you delete untracked local files from your current working tree? Sep 14 ' 08 at 9:06 · Up vote 9015 Down vote Accepted Loading when ...
The -d option tells git to remove untracked directories too. If you don't want to delete empty untracked directories, omit -d option. The -f option ...
Use git rm to delete a file and make Git recognize the deletion. git rm path/to/file git commit git push.
Well, the short answer as per the Git Documents is git clean. If you want to see which files will be deleted you can use the -n option before you ...
for git rm to remove from the index only the paths that have disappeared from the filesystem. ... next commit should record all modifications of tracked files in the working tree and ...
If you have it in ignore, use git clean -xf . You can do git clean -df but that will also remove un-tracked directories. Use -n for a dry-run. See cleaning up ...
requireForce is not set to false, git clean will refuse to delete files or directories unless given -f or -i.
Git “remove” FAQ: How do I tell Git not to track a file (or files) any more?
to discard changes in working directory) deleted: PROJECTS.md no changes ...
Using git stash to delete files in a safer way. . Another method of getting a clean working ...