Tag Archives: Git stash pop Error

[Solved] Git stash pop Error: Another git process seems to be running in this repository……

 

summary

When developing new functions in the dev development branch, there is an emergency bug in the master branch that needs to be fixed. The command git stash can temporarily store the code changes of the current dev branch and switch to the master branch to solve the emergency bug. Today, I encountered a git error message that I restored the temporary code after switching back to the dev development branch, but the code could not be submitted after restoration, resulting in Git process conflict. The specific error information is as follows:

 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.

After the research on the solution of error information, we found a specific and effective solution

solutions

Main idea: git process has been opened in an editor. Please make sure all processes are finished before trying. If it still fails, git in the last run may crash. Please remove this file manually before continuing

1. Nature of the problem: 

Windows has a lock mechanism for process management. Under normal circumstances, the process runs = = > Process lock = = > Process end = = > The process is unlocked. Maybe I accidentally shut down git while switching branches, which led to git crash, so the locked index.lock didn’t unlock, resulting in conflict

2. Solution: 

Open the project folder and find the index. Lock file in the. Git file. The file that needs to be manually deleted in the error message is the index. Lock file. After deleting, go back to GIT and continue to operate the command, which perfectly solves the conflict problem of GIT process

summary

When operating git command, we need to pay attention to the status of GIT process. The most important thing is that we need to be careful when operating git command. Even when we encounter urgent tasks, we need to be calm to solve them. We can’t eat hot tofu if we are anxious