Git SVN error: a Git process crashed in the repository earlier

我是研究僧i 提交于 2019-12-18 10:13:16

问题


I was just trying to commit changes to the Git master. From what I have read, it seems that the idea is to delete the lock file. The message says:

make sure no other Git processes are running and remove the file manually

Perhaps someone knows, which file to remove and how to remove?


回答1:


The file in question is likely .git/index.lock and it should be safe to just remove it if you have no other git processes running. Make sure a git-svn command isn't hanging.

PS My usual approach to fixing git-svn problems is to make a fresh pull of the repository. Time consuming, but you can do it in parallel with trying to fix the problem. Have a little race between you and git. Of course, this only works if you didn't have unpushed commits.




回答2:


Removing the index.lock file like Schwern stated will solve this problem.

You can remove it by running rm -f ./.git/index.lock

The rm command is used to remove (delete) files and directories.

The -f stands for force which tells your computer to remove the files without prompting for confirmation




回答3:


For "GUI" user like me

Open Git Extension and choose repository (if more than one) Choose "Settings" from top menu then "Git Maintenance" and then click on "Delete Index Lock"

Git Extensions: Settings->Git Maintenance->Delete Index Lock




回答4:


You have already opened a commit in another tab in the terminal




回答5:


It may also concern any *.lock files in .git/

Check and remove them. You may use: rm -f ./.git/*.lock




回答6:


The answer giving by @Joel helped, except that for windows users you may have to enable show hidden files/folders to access .git folder where index.lock file exist. Use this link in case you don't know how to enable hidden folders.




回答7:


Removing the index.lock file like Schwern stated will solve this problem.

You can remove it by running rm -f ./.git/index.lock

The rm command is used to remove (delete) files and directories.

The -f stands for force which tells your computer to remove the files without prompting for confirmation

still not working means open the git through git bash instead of doing in terminal



来源:https://stackoverflow.com/questions/9185053/git-svn-error-a-git-process-crashed-in-the-repository-earlier

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!