Lost
Lost

Reputation: 13653

A file does not exist in the file system but .gitignore still lists that file

I had a few files which I added to .git Ignore when they existed but they do not exist anymore. However, they are still listed in .gitignore.

when I do command git rm --cached it says that file does not exist for the obvious reasons.

Is there a way that I can tell .gitignore so stop ignoring files that just do not exist anymore?

Upvotes: 1

Views: 346

Answers (2)

Randy Leberknight
Randy Leberknight

Reputation: 1463

.gitignore is just a file which is in your repository. Edit the file, remove the lines which specify the files you don't want, and commit .gitigore.

Upvotes: 0

eftshift0
eftshift0

Reputation: 30327

Just remove the lines from .gitignore and you'll be fine.

Upvotes: 3

Related Questions