I know this may be an ultra-newbie question, but - although I've been coding for like 18 years - it's been only a few days that I've been using Source Control for my project and I feel quite lost.
I have set up Git properly and, from time to time, I'm commiting the changes.
(File -> Source Control -> Commit)
However :
Whenever I try to delete a file (that initially existed) and then commit the changes, I'm getting an error like this :
The working copy "MY_COPY_NAME" failed to commit files
fatal: could not switch to "/the/path/of/the/file/i/just/deleted": no such file or directory
What's going on?
What should I do in order to commit the changes even after a file has been deleted?
you should run
git add -u your_file
the -u means you want to update the file you already added. Another possibility is
git rm your_file
And it's likely you get an error if Git does not find an inexisting
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With