有时候在提交的时候,中间提交出错,导致有文件被lock,所以会报下面的错误:

fatal: Unable to create ‘/msg/.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.

出现这种情况可以用以下解决办法:

试着删除 index.lock

1、命令行代码   rm -f ./msg/.git/index.lock

2、直接去文件系统进行删除该lock文件

Git – fatal: Unable to create ‘/.git/index.lock’: File exists错误解决办法的更多相关文章

  1. Git添加本地项目出现fatal: unable to get credential storage lock: File exists

    把本地项目初始化之后上传到github上出现问题:fatal: unable to get credential storage lock: File exists 解决办法:是因为我上传用的git帐 ...

  2. create ‘/.git/index.lock’: File exists.

    Git – fatal: Unable to create ‘/.git/index.lock’: File exists. fatal: Unable to create ‘/path/my_pro ...

  3. EXCEPTION:FATAL: UNABLE TO CREATE ‘…GIT/INDEX.LOCK’ FILE EXISTS

    FATAL: UNABLE TO CREATE ‘…GIT/INDEX.LOCK’ FILE EXISTS Hi, Today I will share you my other experience ...

  4. git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists.

    git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists. 具体出错代码如下: 具体原因不详,在stackoverf ...

  5. git提交代码报:fatal: Unable to create 'E:/testGit/test/.git/index.lock': File exists.

    git提交代码报错,提示:fatal: Unable to create 'E:/testGit/test/.git/index.lock': File exists. 具体截图如下: 在.git目录 ...

  6. Git本地仓库与远程github同步的时候提示fatal: remote origin already exists 错误解决办法

    Git本地仓库与远程github同步的时候提示fatal: remote origin already exists 错误解决办法 1.git在本地的电脑创建了仓库,要远程同步github的仓库.使用 ...

  7. git error: unable to write file xxx,git fatal: unable to write new index file

    执行git checkout -- . error: unable to write file mobile/manifest.jsonfatal: unable to write new index ...

  8. 记一次git fatal: Unable to find remote helper for 'https'问题的解决

    登陆到远程linux服务器上,使用git, clone的时候报“fatal: Unable to find remote helper for 'https'”错,没管,绕过,使用git clone ...

  9. Git 提示fatal: remote origin already exists 错误解决办法

    今天使用git 添加远程github仓库的时候提示错误:fatal: remote origin already exists. 最后找到解决办法如下: 1.先删除远程 Git 仓库 $ git re ...

随机推荐

  1. spider

    from lxml import etreeimport requestsdef getHtml(html): novelcontent = requests.get(html).content re ...

  2. FreeBSD_11 - 系统管理——{ Part_5 - ZFS }

    参考資料 http://docs.oracle.com/cd/E37934_01/html/E36658/toc.html https://www.freebsd.org/doc/en_US.ISO8 ...

  3. 关于.NET(c#)引用Dll后,找不到命名空间的问题

    最近做了一个Silverlight项目,一个类库引用DLL后,找不到命名空间.于是各种google,方法如下: 1.类库与DLL的目标框架不一致: 2.删除obj下文件和清空bin下文件: 3.重装系 ...

  4. EasyUI DataGrid 配置参数

    var queryParams = $('#SBDiv_1_DateGrid').datagrid('options').queryParams; queryParams.SearchTime = & ...

  5. java-GUI图形用户界面

    图形用户界面GUI(Graphical User Interface),指的是在一个程序中用户可以看到的和与之交互的部分. JavaAPI中提供两套组件用于支持编写用户界面AWT  and  Swin ...

  6. C#基础(1)

    .NET的开发方向,有三种: ① 桌面开发系统,即WinForm: ② Internet应用程序,ASP.NET,其实也就是网站开发: ③ 手机开发,WP7,Windows Phone 7. .NET ...

  7. 根据UserAgent 获取操作系统名称

    /// <summary>        /// 根据 User Agent 获取操作系统名称        /// </summary>        private sta ...

  8. 在CentOS6.7操作系统上编译安装mysql-5.6.31

    功能概述: 由于在centos 6.7下通过yum安装的mysql是5.1版本的,不满足需求,因此经常性需要编译安装mysql服务等. 一.安装mysql 1.安装前提 1)安装编译mysql代码所依 ...

  9. Java多线程死锁的产生实例

    死锁产生的四个必要条件: (1) 互斥条件:一个资源每次只能被一个进程使用.(2) 请求与保持条件:一个进程因请求资源而阻塞时,对已获得的资源保持不放.(3) 不剥夺条件:进程已获得的资源,在末使用完 ...

  10. 热烈庆祝杨学明老师为苏宁、中兴、烽火、CNNIC、创维、金立、中航信等知名企业提供培训和咨询服务!

    在2015年三季度,研发资深顾问.资深讲师杨学明先生为国内多家名企提供了培训和咨询服务!由于杨学明老师在软件及互联网方面的管理经验极为丰富,被多家公司选为首席研发讲师!并聘为常年顾问!