lujilox.blogg.se

Remove all untracked files
Remove all untracked files







remove all untracked files
  1. #REMOVE ALL UNTRACKED FILES HOW TO#
  2. #REMOVE ALL UNTRACKED FILES CODE#

You start coding up a feature, change a few files, add a few others and. I use it all the time and I know you do to. " to just do the equivalent of git reset -hard, but the latter really also does a git clean which removes all untracked files from the working tree! That's such a dangerous command that I argue there shouldn't even be an UI entry for it. " to do the equivalent of git reset -mixed (what it seems to do) and "Discard. Given the two menu entries "Unstage all changes" and "Discard all changes" I would have expected "Unstage. And they will go through great lengths to get there, even if not knowing what their doing or after warned that they are in dangerous waters. People don't hit this issue because we have that action they hit it because they want to clear that list. Oh what is this? Discard all changes sounds a lot like what I want to do.

#REMOVE ALL UNTRACKED FILES HOW TO#

It looks like its touching my files, I don't like that, how to I get them out of here?

  • Oh what is this? All my files appear in this list.
  • Oh what is this? Yes, let's initialize, git sounds awesome, people use it.
  • #REMOVE ALL UNTRACKED FILES CODE#

    VSCode Version: Code 1.14.2 ( cb82feb, T23:26:08.116Z)Īuthor As we discuss this, keep in mind that most users who hit the "omg where are all my files" issue come into following these three simple steps:.It just mention it in case someone also encountered that before or comes up with a scenario where this might happen. I haven't really been able to reproduce that, though, so it might be just me being confused. What might make things worse (and the scenario from #32405 more plausible) is that I think that during my tests vscode twice initialized a git repository in the current directory on its own, that is, without me clicking "Initialize Repository" or running "git init" on the command line. Minor nitpick: I think the safer option of the two ("Unstage.") should come first in the menu."Are you sure you want to discard ALL changes?" (is an untracked file really a "change"?) but clearly state the fact that untracked files will be removed and maybe name (some of) them. Even if that's really how "Discard changes" is supposed to work, then the warning should not just read.The thingĪbout the warning is: If I want to do a git reset -hard I expect a warning (and would therefore confirm it) because it is dangerous. (more) useful and might give a hint that "Discard changes" is really even more dangerous. There doesn't seem to be a equivalent to just git reset -hard in the menu, which I would consider.

    remove all untracked files

    Given the two menu entries "Unstage all changes" and "Discard all changes" I would have expected "Unstage.There are multiple things that I consider problematic: Result: test-1.txt is reset to the version that was committed (as expected), and test-2.txt is deleted although it was never added to git!.Select "Discard All Changes" from the overflow menu (three dots in in the upper right corner) of the "Source Control" Tab and confirm the warning dialog that appears:.Make some random change to the content of file test-1.txt On the "Source Control" Tab: Click "Initialize Repository" (but, see below)Īnd the state of the repository is reported by git status like this, as expected.In vscode: "File" -> "Open Folder" -> Open the directory just created.









    Remove all untracked files