Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • Suppose I am at 1st pic meaning meaning I have not even did "git.add". Also, I not at all want all this change. I mean when I do git status, it should not show any red files. I mean it should be in sync as if there was not a single file altered since the last git push. how to achieve that. Commented Mar 26, 2017 at 0:59
  • SO suppose you are just at step first. And you want to get rid of all the changes you have done which is making "newFile.txt" to come up as red. Commented Mar 26, 2017 at 1:00
  • When I do git status. I should not see any change at all. All the red files should get reverted. Commented Mar 26, 2017 at 1:00
  • Hi, I think your question is how to remove untracked files from the current tree. For that, you can use "git clean -f -d". This will remove untracked directories as well. Commented Mar 26, 2017 at 10:19
  • If you don't want to delete the untracked files, just ignore "-f" flag. Commented Mar 26, 2017 at 10:20