I can't discard changes on visual studio git

1.2k Views Asked by At

I was playing with git and github, so was learning how to contribute to opensource projects, so i forked and cloned a repository. Afterwards, i deleted the entire file, only to discover that my commits were still staged. I have tried deleting them to no avail. It bugs me because it keeps showing i have over 10k staged commits and i can't unstage or delete them. I even uninstalled vs code but it's still there. the following screenshot shows the error message i get when i try unstaging and discarding them. error Message

here is the other screenshot of before i clicked on it, showing me i have over 10k changes unstaged.10k files

1

There are 1 best solutions below

1
On

Open the terminal in VSCode and from any directory inside the project type:

git reset

This should unstage all and allow you to stage files individually