5

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?

2 Answers 2

4

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

Sign up to request clarification or add additional context in comments.

Comments

0

To fix above error you should use below lines of code:

  1. Open the command line [Terminal] and enter the following two commands:
xcrun git config --global user.email [email protected] xcrun git config --global user.name "Enter Your Name" 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.