isqad
isqad

Reputation: 290

Deleting file from git cache

How to auto delete file from Git cache when I deleted it by hand in sublime text 2? Is there a plugin to do so?

Upvotes: 0

Views: 234

Answers (2)

patiencing
patiencing

Reputation: 106

Remove the definite file which you want to ignore, rather than removing all files in cache, it will reduce risk.

  1. add to .gitignore;
  2. delete the file/files git rm cached <file>

Upvotes: 0

MangeshBiradar
MangeshBiradar

Reputation: 3938

This is the way you can remove file/folders from git cache manually.

Remove tracking of file/folder - but keep them on disk - using

$ git rm --cached 

Now they do not show up as "changed" but still show as untracked files in

$ git status -u  

Add them to .gitignore

Use

$ git config --global core.editor

Upvotes: 1

Related Questions