-3

enter image description here Please look at the screenshot.First,I updated a file and wanted to add it to the stage,but failed.It said the path was not right .Before adding it ,I had checked the path which was right.

0

1 Answer 1

2

It doesn't say the path isn't right, it says it can't create a lock. If no other git instance is running, you could try deleting the lock manually.

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

3 Comments

I wanted to add it to ../learngit/ .What's the matter wih the path '../learngit/git..' ?
@Xiaolong '../learngit/git..' files/folders cannot have a .. suffix, but that is not the problem in your case, read the error message git throws
@Xiaolong: Git creates a lock file when touching the repository. Normally, the lock file would be removed on a successful end of the operation, but in this case, something went wrong, so the lock file is still there. Just rm .git/index.lock.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.