Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

How to remove from tracking deleted from HDD file with a tricky name?

So I added this file to git(when I created git repository):

"~$\320\234\320\265\321\202\320\260\320\273\320\273\320\270\321\207\320\265\321\201\320\272\320\270\320\271 \320\264\320\265\321\200\320\266\320\260\321\202\320\265\320\273\321\214.sldprt"

It's a temporary file created by SolidWorks. Then after I closed original file, this temporary file got deleted. Now I have this not staged message:

mintty_cViC00mahP.png

 

When I type 

git add -u "~$\320\234\320\265\321\202\320\260\320\273\320\273\320\270\321\207\320\265\321\201\320\272\320\270\320\271 \320\264\320\265\321\200\320\266\320\260\321\202\320\265\320\273\321\214.sldprt"

 

It throws error:

fatal: pathspec '~$\320\234\320\265\321\202\320\260\320\273\320\273\320\270\321\207\320\265\321\201\320\272\320\270\320\271 \320\264\320\265\321\200\320\266\320\260\321\202\320\265\320\273\321\214.sldprt' did not match any files

mintty_JfCJPpb597.png

 

How do I fix this and remove this file from tracking completely so I don't get this message about a not staged file?

 

1 Reply
Highlighted
Community Manager
Message 2 of 2

Re: How to remove from tracking deleted from HDD file with a tricky name?

If you have an otherwise clean working tree, then you should be able to use the command `git add --all .` to stage all tracked changes, including deleted files.

 

By "otherwise clean working tree" I mean that the file you want to get git to stop tracking is the only item that shows up when you run `git status`.

 

I hope that helps!