"Commit Changes" is listing deleted files and folders. How to clean it?

Answered

The Commit Changes windows is listing folders and files that not exist in my project anymore.

The files and folders were never committed.

How do I clean this?

0
4 comments

When you add a file to git it is staged. If you then just delete the file from the disk, it still will stay staged in git.

Probably that is what has happened. Check git status in the command line to see if it the case. If it is the case, you can just rollback the file, or call git reset to clear staging area.

How did you get in such situation, btw? Was the file delete outside of the ide?

0
Avatar
Permanently deleted user

My code is managed at VSTS with TFVC.

It git status applicable to my scenario?

 

The files never existed at VSTS and they are deleted from project and disk.

0

> My code is managed at VSTS with TFVC. Is git status applicable to my scenario?

No, it is only if you use git. Sorry, I thought you use git as the scenario is possible there.

> The files never existed at VSTS and they are deleted from project and disk.

But the file existed in the project, and was scheduled for Check-In, right? How did you delete it - via IDE, or using some File manager outside the IDE?

Does reverting the file help?

0
Avatar
Permanently deleted user

I deleted the files from the project and then from the disk. Then this problem happened.


In the meanwhile I found a way to resolve this.

  1. I recreated the folders/files on my disk.
  2. At "Commit Changes" I deleted the files.

Thank you Dmitriy.

 

0

Please sign in to leave a comment.