美文网首页
repo sync error: cannot initiali

repo sync error: cannot initiali

作者: 熊本猫 | 来源:发表于2018-09-20 14:31 被阅读0次

当repo sync中断或者冲突的时候可能出现 error: cannot initialize work tree的报错
处理方法:
执行repo sync -cdf输出sync的详细信息
等待报错出现

: git rev-parse --verify refs/remotes/github/cm-13.0-caf-8996^0 1>| 2>|
: cd ......../packages/apps/DocumentsUI
: git read-tree --reset -u -v HEAD 1>| 2>|
fatal: This operation must be run in a work tree
Traceback (most recent call last):
  File "/home/panos/android/cm13/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/home/panos/android/cm13/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/home/panos/android/cm13/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/panos/android/cm13/.repo/repo/subcmds/sync.py", line 769, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/home/panos/android/cm13/.repo/repo/project.py", line 1247, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/home/panos/android/cm13/.repo/repo/project.py", line 2393, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree

找到报错的仓库路径——packages/apps/DocumentsUI
然后分别删除根目录下的packages/apps/DocumentsUI文件夹,.repo/projects/packages/apps/DocumentsUI.git
.repo/project-objects/packages/apps/DocumentsUI.git
删除之后重新执行repo sync -j2 -c即可

相关文章

网友评论

      本文标题:repo sync error: cannot initiali

      本文链接:https://www.haomeiwen.com/subject/ewxnnftx.html