gitgit-statusgit-clean

git clean directories in untracked files


How can I remove directories from untracked files that aren't appearing in git clean -n? Here are my steps:

git status

...gives me:

Untracked files:
(use "git add <file>..." to include in what will be committed)

css/
../../../../../../../../site-testing/lru-cache/

I get no results from git clean -n (or git clean --dry-run).

How can I remove these directories from appearing in untracked files?


Solution

  • You need to add them to a .gitignore file

    http://git-scm.com/docs/gitignore