Source Control 5001 Chnages – Visual Studio Code

Source Control 5001 Chnages – Visual Studio Code

Hello Everyone

I am new to Github. I am using Github from Visual Studio Code ( version 1.49.1 ). My Git version is 2.28.

Every time I am editing a file in VS code I can see that there is an icon in the source control “5K” and it says “Source control 5001 pending changes ”

How to fix this issue ?


Do you mean something like this?

If so, that means that you have over five thousand files changed in your current project. In order to “fix” that, you would need to commit those changes to the repository. You can find an introduction on how to do this in VS Code on the VS Code website:

Version control is a rather complex topic though and any simple task-based set of instructions is not going to give you a good overview of the subject. You may want to check out Git from the Bottom Up as an introduction to how and why version control using git works the way it does.

I hope that helps!

Yes, that’s a different view that indicates the same thing as what I mentioned above.

That screenshot looks like you turned your whole user directory into a git repository. That’s technically possible, but carries a high risk to accidentally commit private data (starting right at the top with .bash_history). In most cases people use multiple repositories for different projects or other sets of files (like personal configuration files they want to keep under version control).

Thanks for the reply .
How can I turn off or remove the user directory from the git repository ? Is there any specific set of commands for that ?

Technically, to make your user directory not a git repository you can just delete the .git directory in there, BUT that means losing any history you may already have in there. :warning: So do that only if you’re sure that’s what you want, and if so triple check you’re about to delete the right .git directory, and not that of some other repository that you want to keep.

In directories that you want to become git repositories you can run git init to create the repositories.

I don’t use VSC, so I’m afraid I can’t tell you how to integrate either with it. My go-to recommendation for git introduction is the Git Book.

1 Like

Thanks :slight_smile:

1 Like