git index.lock

2019-09-08 21:45:31


解决办法:  删除.git文件夹下面的index.lock


在git没有运行完成之前强制关闭,下次提交的时候会产以下生错误,或者类似的。


fatal: Unable to create '/xxx/xx/.git/index.lock': File exists.


If no other git process is currently running, this probably means a

git process crashed in this repository earlier. Make sure no other git

process is running and remove the file manually to continue.

1

2

3

4

5

原因是在你进行某些比较费时的git操作时自动生成,操作结束后自动删除,相当于一个锁定文件,目的在于防止对一个目录同时进行多个操作。

有时强制关闭进行中的git操作,这个文件没有被自动删除,之后你就无法进行其他操作,必须手动删除,进入.git文件中



  • 2018-01-26 01:05:22

    Android在thread中Toast不能显示问题解决

    一般如果不是在主线程中又开启了新线程的话,一般都会碰到这个问题。 原因是在创建新线程的时候默认情况下不会去创建新的MessageQueue。

  • 2018-01-29 15:18:57

    Druid多数据源配置

    搞了一天,竟然输在了把datasource,携程dataSource.老是切换不成功,几近崩溃。