Another git process seems to be running in this repository

Farooq Yousuf
Sep 6, 2018 · 1 min read

Today I ran into an error when I was trying to switch branches from master to a feature branch using Git.

The error said:

fatal: Unable to create ‘/Users/farooqyousuf/workspace/idme_apps/idme-revelator/.git/index.lock’: File exists.Another git process seems to be running in this repository, e.g.an editor opened by ‘git commit’. Please make sure all processesare terminated then try again. If it still fails, a git processmay have crashed in this repository earlier: remove the file manually to continue.

Usually, issues like this happen when multiple Git commands are executed at once. In my case I think there was a stale command from a previous session running in the background.

The fix:

rm -f .git/index.lock

Afterwards, I was able to create my new feature branch.

FusionQA

QA Engineering & Automation

Farooq Yousuf

Written by

I blog about QA Automation and Islam.

FusionQA

FusionQA

QA Engineering & Automation

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade