This .git/index.lock file automatically gets created whenever git add . command is given in Git bash.
Even after deleting the file manually, and it generates lots of warnings.
How can I resolve this, and use git push?
This .git/index.lock file automatically gets created whenever git add . command is given in Git bash.
Even after deleting the file manually, and it generates lots of warnings.
How can I resolve this, and use git push?
It depends on the local system (OS, server type, disk space, ...), as illustrated in "git index.lock File exists when I try to commit, but cannot delete the file".
It can be a process keeping an handle to the lock file, or it can be a permission issue.
So before trying a git push, you must first understand why the index.lock file remains.
As I mention in "if git index.lock exist, can I safely delete it, or are more actions needed to verify integrity?", a workaround is to delete it manually, before pushing.