Skip to content

Git repo put into a bad state after ".git/index.lock: File exists." errors #112

@dwickern

Description

@dwickern
dwickern:ui dwickern$ ember-cli-update --ignore-conflicts
Cloning into bare repository '/var/folders/dz/4bq_l12j3491zyx7g8vk6nr80000gn/T/tmp-6689NVfjU3YWGjuY/.git'...
Switched to a new branch '3bccf3c0-93e9-11e7-b21b-ab3e637caecb'
Note: checking out 'f98da31d2299050773c98e01b1019437cd323391'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at f98da31... 2.14.0
fatal: Unable to create '/Users/dwickern/code/my-app/.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 processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
{ Error: Command failed: git add -A
fatal: Unable to create '/Users/dwickern/code/my-app/.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 processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.

...

dwickern:ui dwickern$ git show
fatal: your current branch '3bccf3c0-93e9-11e7-b21b-ab3e637caecb' does not have any commits yet
dwickern:ui dwickern$ git status
On branch 3bccf3c0-93e9-11e7-b21b-ab3e637caecb

Initial commit

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	./

nothing added to commit but untracked files present (use "git add" to track)

Recovered with git checkout --force master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions