fatal: unable to create 'refs/heads/master.lock': File exists fatal: - Getting this error while pushing the commits
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting the following error while pushing the commit $ git push origin master fatal: unable to create 'refs/heads/master.lock': File exists fatal: The remote end hung up unexpectedly I thought of removing the lock file ( refs/heads/master.lock ) from my local machine. But this file is not available. I think this file is in git server. What is the origin of this issue? If I remove this file from the server, will it solve the issue if the file exists? 回答1: You need to remove existing .lock file and try to push, Linux rm -f .git/refs/heads