git reset --hard xxx_gitTag遇到的一些问题解决方法

 

GIT: /.git/index.lock': File exists

 

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

 

解决方法:

Try

rm -f ./.git/index.lock

In your repository directory.

 

===================================

Unlink of file failed

Unlink of file 'xxx/xxx/xxx.xx' failed. Should I try again? (y/n) y

That usually means a process is still using that specific file (still has an handle on it)
(on Windows, ProcessExplorer is good at tracking that kind of process)

 

解决方法:关掉你的VS2008等IDE。

===================================

 

error: git checkout-index: unable to create file (Permission denied)

 

error: unable to create file xxx/xxx/release/emulator/bin/Loader.log (Permission denied)
fatal: Could not reset index file to revision 'c6e028341caa8d72ab407d69e63a6503e69d84ae'.

上面链接说的都是权限问题,但是不要被这个提示误导了。我的实际上是一个loader.exe在打开,关闭就好了。

$ git reset --hard xxx_gitTag(也就是git log下显示的commit后面跟的commitId)
HEAD is now at c6e0283 Merge MR-255 from branch 'somebody/xxx_project.git::master' into 'master'

解决方法:关掉某个运行的exe,它可能正在占用某个文件。

 

posted on   cleverlzc  阅读(2354)  评论(0编辑  收藏  举报

编辑推荐:
· 软件产品开发中常见的10个问题及处理方法
· .NET 原生驾驭 AI 新基建实战系列:向量数据库的应用与畅想
· 从问题排查到源码分析:ActiveMQ消费端频繁日志刷屏的秘密
· 一次Java后端服务间歇性响应慢的问题排查记录
· dotnet 源代码生成器分析器入门
阅读排行:
· 软件产品开发中常见的10个问题及处理方法
· 互联网不景气了那就玩玩嵌入式吧,用纯.NET开发并制作一个智能桌面机器人(四):结合BotSharp
· Vite CVE-2025-30208 安全漏洞
· MQ 如何保证数据一致性?
· 《HelloGitHub》第 108 期
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示