Git 代码签出错误解决
今天是节后的第一个工作日,下午一到单位就开始拉代码,但是很遗憾,命令行有报错:
error: cannot lock ref ‘refs/remotes/origin/aparna_VAN-419‘: is at 6adb1ff7b8c5781af00d3d08125c69b30f127597 but expected f74fc99045f08484c68a20213768b87736edc244
除了重新克隆一份外,还找到了一个相对简单的方式:
进入到项目根目录,执行下面命令:
rm .git/refs/remotes/origin/aparna_VAN-419
git fetch