After renaming package of an android application, I am facing a commit error as follows:
Showing user error Failed to create a new commit. LibGit2Sharp.LockedFileException: The index is locked. This might be due to a concurrent or crashed process
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Index.Replace(TreeChanges changes)
at LibGit2Sharp.Index.Replace(Commit commit, IEnumerable`1 paths, ExplicitPathsOptions explicitPathsOptions)
at LibGit2Sharp.Index.Replace(Commit commit)
at GitHub.ExclusiveRepositoryConnection.<>c__DisplayClass13.b__10()
at System.Reactive.Linq.ObservableImpl.Defer`1.Eval()
at System.Reactive.Linq.ObservableImpl.Defer`1._.Run()
Renaming package caused changes in 1) almost entire files of the android application and also 2) folder names of Git repository.
Does anybody have the same issue? Or am I missing something?
Any input will be greatly appreciated!
Regards,
The problem is that there is already an index.lock
file in the .got folder of your repository. Every time you create a commit, a check is made that this file does not already exist.
Fix this issue by running
On linux/unix/gitbash/cygwin,
rm -f .git/index.lock
On Windows Command Prompt, try:
del .git\index.lock
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With