3

I unziped a file containing approximately 7k files on my project folder by mistake.

While the files were being extracted, I noticed that Visual Studio Code showed this message:

The git repository at [...] has too many active changes, only a subset of Git features will be enabled.

When the extraction was completed, I moved the newly generated folder to a different location outside de repository.

Is my git repository somehow corrupted now? Or I can safely continue working as before as if nothing had happened?

Both Visual Studio Code and GitKraken show me the same unstaged files that I had before the faux pas, but I'm not sure if I have to do some checks before commiting (is a local repo).

Matías Cánepa
  • 5,770
  • 4
  • 57
  • 97
  • If I understand correctly you change the directory location to not be in your project and you want that, Git is like a tree and it is starting at the top of the directory that you started with `git init` and contain all of the sub directories, moving files and directories from that tree wouldn't effect the project you should just check with `git status` after removing/changing the sub_directory you want and then add a new commit after that it's like that file/directory never have existed before, but be careful that the sub_directory doesn't contain dependencies of your main project – itshosyn Aug 05 '21 at 13:59
  • If you didn't `commit` those changes , you are safe – Ivan Aug 05 '21 at 14:27

2 Answers2

4

If you didn't stage the unzipped files and simply did some file operations in the directory without actively using git (stage/add, commit), you should be fine.

You can confirm this if the status of you repo is normal after a commit: nothing to commit, working tree clean

Marc
  • 338
  • 2
  • 15
4

When the extraction was completed, I moved the newly generated folder to a different location outside de repository.

Then simply close and relaunch VSCode.
As seen in microsoft/vscode issue 96577, that will force a status refresh, and the warning should be gone.

But the git repository itself has not been "corrupted" by this episode. This message comes only from VSCode Git integration itself.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250