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
Similar Posts:
- [Solved] Git Error: “Another git process seems to be running in this repository…”
- Git Error: Unable to create ‘D:/xxx/.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 p
- [Solved] Unable to create ‘.git/index.lock’: File exists
- Unable to create ‘x/.git/index.lock’
- [Solved] Computer reboot causes broken git files
- Could not open lock file/var/lib/dpkg/lock [How to Solve]
- E: Unable to get lock / var / lib / apt / lists / lock – Open (11 resources temporarily unavailable)
- IDEA Could Not pull Codes to Local Error: Can’t Update No tracked branch configured for branch master or the branch doesn’t exist.
- Cocos creator Build Game Times Error: Build Failed: TypeError: Cannot read property ‘configs’ of null
- [ERROR] InnoDB: Unable to lock ./ibdata1,error: 11