5

I am trying to clean my working tree, however, when I enter git clean --force nothing happens.

$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

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

        packages/Microsoft.AspNet.WebPages.2.0.30506.0/
        packages/Microsoft.Data.Edm.5.2.0/
        packages/Microsoft.Data.OData.5.2.0/
        packages/Microsoft.Net.Http.2.0.20710.0/
        packages/Microsoft.Web.Infrastructure.1.0.0.0/

nothing added to commit but untracked files present (use "git add" to track)

$ git clean  --force

$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

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

        packages/Microsoft.AspNet.WebPages.2.0.30506.0/
        packages/Microsoft.Data.Edm.5.2.0/
        packages/Microsoft.Data.OData.5.2.0/
        packages/Microsoft.Net.Http.2.0.20710.0/
        packages/Microsoft.Web.Infrastructure.1.0.0.0/

nothing added to commit but untracked files present (use "git add" to track)

Likewise, git clean -i has no effects either.

BanksySan
  • 27,362
  • 33
  • 117
  • 216
  • possible duplicate of [Remove local (untracked) files from my current Git branch?](http://stackoverflow.com/questions/61212/remove-local-untracked-files-from-my-current-git-branch) – BanksySan Nov 12 '14 at 20:10

1 Answers1

8

These are all directories, in order to remove directories you need to use the command :

git clean -f -d

Thanks to this answer.

Community
  • 1
  • 1
BanksySan
  • 27,362
  • 33
  • 117
  • 216