Pinchas K
Pinchas K

Reputation: 1571

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

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?

Upvotes: 116

Views: 109185

Answers (11)

Hitesh
Hitesh

Reputation: 121

I was getting this issue in git bash although there was no index.lock file. Surprisingly, the "git pull" worked on first go in Windows command prompt. Tricky it was!

Upvotes: 0

user16891185
user16891185

Reputation: 1

Just type .git Infront of the project path. For example: C:\DotNetAngularProject\MyApp\.git

You will get list of files & folders list of file names like HEAD,FETCH

Delete index.lock file manually.

Close your project & restart again.

Issue will be solved.

Upvotes: -1

El Houcine Es-sanhaji
El Houcine Es-sanhaji

Reputation: 101

I was facing the issue, and I couldn’t even able to find the index.lock. My environment was a little bit different, a cluster with multiple nodes. The issue was encountered in the master node, and I solve it just by jumping to the worker node since the master node is chaired by all connected user

Upvotes: 0

Abhay Kumar Upadhyay
Abhay Kumar Upadhyay

Reputation: 3009

I solve this error by just following steps:-

  1. Go in your same directory in which your project exist.
  2. Unhide Hidden files (for ubntu press ctrl+ H)
  3. Move inside .git directory
  4. Remove "index.lock" file

It solve this Problem

Upvotes: 1

sarangan
sarangan

Reputation: 63

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

Upvotes: 0

Joyce obi
Joyce obi

Reputation: 79

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.

Upvotes: 0

artegen
artegen

Reputation: 161

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

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

Upvotes: 6

Joel
Joel

Reputation: 4593

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

Upvotes: 87

Andrew Denysyuk
Andrew Denysyuk

Reputation: 21

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

Upvotes: 2

user3981082
user3981082

Reputation: 111

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

Upvotes: 9

Schwern
Schwern

Reputation: 164679

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.

Upvotes: 217

Related Questions