变更记录

序号 录入时间 录入人 备注
1 2016-07-01 Alfred Jiang -
1 2016-11-29 Alfred Jiang -

方案名称

Git - 常见错误与解决方案

关键字

Git \ 常见错误 \ 解决方案

需求场景

  1. 使用 Git 时遇到的常见错误解决方案

参考链接

(见详细内容)

详细内容

1. error: The following untracked working tree files would be overwritten by checkout:
1
2
$ git clean -d -fx ""
$ git checkout -f another-branch
2. fatal: Unable to create 'xxx/xxx/.git/index.lock': File exists.
1
2
# 解决办法:直接删除 index.lock 文件
$ rm xxx/xxx/.git/index.lock

效果图

(无)

备注

(无)