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 2017-05-17 09:58 cleverlzc 阅读(2341) 评论(0) 编辑 收藏 举报
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步