0

Very annoying, gave me around 200 untracked files, every time I delete them they pop back up again. Tried to use lightweight mode and surprisingly it did not work. They files do not have a pattern but it seems like only adding them to .gitignore worked. But I thought there should be a better option.

Not sure if the Java Extension Pack did that or not, but after uninstalling it the problems are still there so I reinstalled them.

I really just wish to get rid of them, don't know if it's also causing some build problems. Been stuck on this for more than a week.

Some posts I have looked at:
https://github.com/redhat-developer/vscode-java/issues/618
https://stackoverflow.com/questions/53509715/what-project-files-does-visual-studio-code-create-via-its-java-extensions\ VS Code Java Debugger Making a Lot of Untracked Files (My previous post but it died)

Thank you!

Onion
  • 85
  • 1
  • 9
  • In the preview post, i comment you a github issue which includes some possible solutions, i don't know if you have tried every of them. Now can you post your projects in github if it's not that privacy and convenient for me to reproduce the question, i'll try to find the achievable option. – Molly Wang-MSFT Mar 19 '21 at 07:08
  • @MollyWang Hi again Molly. I have tried the two methods you mentioned in the previous post, I even commented under the GitHub [issue](https://github.com/redhat-developer/vscode-java/issues/618#issuecomment-801333949). All the files popped up after I enabled the Java Extension Pack and after using Eclipse, so I don't think it's the project's issue, but if you want you can have a look [here](https://github.com/dockstore/dockstore) – Onion Mar 19 '21 at 14:21
  • Hi, Wendy, there's a setting in vscode can hide these untracked files updated in my answer. please have a try. – Molly Wang-MSFT Mar 26 '21 at 03:21

1 Answers1

1

About removing untracked files from the working tree, the short answer as per the Git Documents is git clean.

Cleans the working tree by recursively removing files that are not under version control, starting from the current directory.

enter image description here

[UPDATE]

The command git clean -d -f has it recurse into untracked directories, so you can also delete all untracked files in subfolders.

There's a configuration that can hide these untracked files in User Settings.json:

"java.configuration.checkProjectSettingsExclusions": true
Molly Wang-MSFT
  • 7,943
  • 2
  • 9
  • 22