Please commit your changes or stash them before you switch branches.

king@king-ThinkCentre-M920s-N000:/media/king/59ff73c6-4ba5-4612-bf31-52f3717f705f/works/android_source$ ./repo sync -j16

remote: Counting objects: 27201, done        ernal/python/cpython2remote: Counting objects: 1           
remote: Finding sources: 100% (21/21)           
Fetching projects:   5% (38/667) platform/external/protobufremote: Total 21 (delta 0), reused 17 (delta 0)        
Fetching projects: 100% (667/667), done.
Checking out projects:  91% (607/667) platform/sdkerror: Your local changes to the following files would be overwritten by checkout:
	stack/smp/smp_cmac.cc
Please commit your changes or stash them before you switch branches.
Aborting
system/bt/: discarding 16 commits
error: system/bt/: platform/system/bt checkout b833f9e6f230f8201f80838888754622345a75e4 
error: Cannot checkout platform/system/bt
Checking out projects:  99% (666/667), done.

error: Unable to fully sync the tree.
error: Checking out local projects failed.
Failing repos:
system/bt
Try re-running with "-j1 --fail-fast" to exit at the first error.

分支内代码不修改,无法切换到其他分支了。
查看那些代码被修改了

./repo status

显示如下:

project system/bt/                              (*** NO BRANCH ***)
 -m     stack/smp/smp_cmac.cc
project system/core/                            (*** NO BRANCH ***)
 -m     adb/adbd_auth.cpp

能看到修改的部分。
上面有两个目录,分别是system/bt/system/core/这两个目录,进入这个目录,使用git恢复吧,在这个目录git命令可用。

你可能感兴趣的:(Android)