突然想说更新一下源码。然后直接使用repo sync发现出错。
error: .repo/manifests/: contains uncommitted changes
于是乎网上找答案。贴一个解决办法。。网友解决办法:
richi 大虾:
to recover any uncommitted change, you should use 'git stash' and 'git clean -f -d'
for example: if you find it say there are uncommitted changes in .repo/manifests, you shoud 'cd .repo/manifests' and then 'git stash', 'git clean -f -d'
也就是先在源码根目录。然后执行
cd .repo/manifests
git stash
git clean -f -d
再来执行
repo sync
即可。
后面发现有点问题。。再没有commit的情况下。有改动的话。是同步不了的。于是乎。我直接删除了除了.repo之外的文件再同步。(千万不要删除.repo,源码都在里面外面的是解包里面的),然后在同步解决了。