Git commit

  1. Git Commit
    I don`t uderstand what i should type
    $git commit -m “Add new user information”

and i`m got error
////
pleas help

git commit -m “Complete second line of dialogue”
fatal: Unable to create ‘/home/ccuser/workspace/sorcerers-code/.git/index.lock’: File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.

You can try going into the .git folder and deleting the index.lock file as recommended in this stackoverflow post. Then try committing, again.

tnx / for help.

This may be an old reply but I’m hoping this is more useful on next who need this solution.

On linux/unix/gitbash/cygwin, try

rm -f .git/index.lock

On Windows Command Prompt, try:

del .git\index.lock

this helps me

2 Likes

FYI: All I did to find that solution is take some of your error message and create this google search. I never encountered the error myself. Hopefully this tip helps you debug future errors!

Hello,
If you were facing the problem with 7. git commit , this reply is for you.

I was facing this problem while i was trying to commit with $git commit - m “Complete first line of dialogue”, it was showing error. I just closed the window and started a new terminal session and wrote the same code and it worked for me.

Thanks.

1 Like