Git报错:index.lock File exists

在使用TortoiseGit提交程序时出现以下错误提示:

git.exe add -f [...]

fatal: Unable to create 'Z:/WPQ3000D/.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文件删除,但是我删除后再次提交后又出现了下面的新问题:

git.exe update-index [...]

fatal: Unable to write new index file

出现这个问题是TortoiseGit操作我.git文件夹中的文件时权限不够导致的,由于我工程文件是放在Ubuntu中的,并将其映射到Windows下,所以就出现了这个权限的问题。

将.git文件夹下的文件使用chmod 777 来修改权限后问题解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值