您当前的位置: 首页 >  git

git中status指令总是提示内容被修改的解决

发布时间:2016-06-05 09:27:40 ,浏览量:0

大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;)

最近在用git提交项目修改时发现一个问题,就是多次

git add .

后,使用status指令总是提示:

XXX目录:git modified content untracked content

将该目录先移动到别处再拷回也不行,也确定没有进程在修改该目录中的内容,这是个肿么一回事呢?

想了一下该目录是从网上用git clone指令克隆下来的项目,是不是其中原有的git数据和我本来的有冲突!?

进入该目录,使用ls -lha显示隐藏目录,发现有一个.git目录,然后用rm -rf .git将其删除,再次使用git add指令,这回又出错,提示如下:

Unable to create '/Users/apple/src/xcode_src/iOS/.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文件手动删掉,再次add,终于可以了 ;]

关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    108697博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.1481s