Another git process seems to be running in this repository

后端 未结 28 2093
梦谈多话
梦谈多话 2020-11-29 14:34

I\'m trying to learn how to use Git and have created a small project with an HTML, CSS, and Javascript file. I made a branch from my basically empty project and then made so

相关标签:
28条回答
  • 2020-11-29 15:01

    just for clarification, for those wondering why rm and del.

    rm .git/index.lock - on a unix/linux system
    del .git/index.lock - on a windows cmd prompt
    

    you could add -f to force the operation that works.

    0 讨论(0)
  • 2020-11-29 15:02

    Use the below command in the root directory of the application. This will delete the index.lock file and release the active lock.

    rm .git/index.lock
    
    0 讨论(0)
  • 2020-11-29 15:02

    i faced the same issue, issue was i tried to push my code with a xml file (used as a data set) which has size of 1.3gb , so i add these file into .gitignore and then problem solved

    0 讨论(0)
  • 2020-11-29 15:03

    If you are windows user there will be error 'rm' is not recognized as an internal or external command. That's because rm is a Linux command. So in windows, you can use below to remove the index.lock file inside .git folder

    del -f .git/index.lock
    
    0 讨论(0)
  • 2020-11-29 15:03

    I got this error while pod update. I solved it by deleting the index.lock file in cocoapods's .git directory.

    rm -f /Users/my_user_name/.cocoapods/repos/master/.git/index.lock
    

    It might help someone.

    0 讨论(0)
  • 2020-11-29 15:05

    It is similar to above methods but in my case I had several of those

    .git/refs/heads/<branch_name>.lock
    

    and was able to remove all at once by this way

    find -name "*.lock" -exec xargs rm {} \;
    
    0 讨论(0)
提交回复
热议问题