Sireesh Yarlagadda
Sireesh Yarlagadda

Reputation: 13726

Git error when trying to push: Discard Changes - Cannot unlock

Im currently using git repository. Unable to push my files to the remote repository.

It says "Discard Changes - Cannot unlock" for C:/somelocation/.git/index.

No other details to figure out the problem.

enter image description here

Even tried to reset.

git reset

But gives the below error.

An internal error occurred during: "Resetting to refs/heads/develop". Exception caught during execution of reset command. {0}

Upvotes: 0

Views: 2473

Answers (1)

isherwood
isherwood

Reputation: 61083

Try deleting C:/somelocation/.git/index.lock. More on that

You may then need to do a reset:

git reset

Upvotes: 5

Related Questions