2011-06-09 87 views
6

我已按照说明here在我的系统上获取cynogenmod源代码。错误与cyanogenmod repo同步

我能够成功完成构建。我没有做任何本地的源代码更改。现在,当我尝试使用repo sync命令来获取最新的源代码,我收到以下错误

error: Your local changes to the following files would be overwritten by checkout: 
    Android.mk 
    extendedcommands.c 
    flashutils/Android.mk 
    flashutils/flashutils.c 
    flashutils/flashutils.h 
    mounts.c 
    mounts.h 
    nandroid.c 
    roots.c 
Please, commit your changes or stash them before you can switch branches. 
Aborting 
error: Your local changes to the following files would be overwritten by checkout: 
    encore.mk 
    init.encore.rc 
Please, commit your changes or stash them before you can switch branches. 
Aborting 
<few more errors like this.........> 
error: bootable/recovery/: CyanogenMod/android_bootable_recovery checkout 50822991460cbee65757e9de12b29e39238d6386 
error: device/bn/encore/: CyanogenMod/android_device_bn_encore checkout f6586ab41f0e3f5acfa16b43f9b17008e9bb0524 

我试图repo forall -c git reset --hard HEAD没有成功。 关于如何解决这些错误的任何建议?

+0

为什么不在氰论坛上提问? – gbn 2011-06-09 17:07:56

回答

6

显然我正面临这个问题,因为我有一个NTFS分区的存储库。 NTFS没有正确存储文件的权限,Git将这看作是一种变化。
您可以强制的Git忽略该文件的权限,同时通过使用以下命令寻找变化:
repo forall -c git config core.filemode false

(!不知道这是否有任何副作用,如果有,请让我知道)

+0

谢谢,当我尝试通过Virtualbox中的共享文件夹进行编译时遇到了相同的问题。我已经将该文件夹移动到本地(虚拟)磁盘,但它不起作用。现在我可以正确同步。 – anol 2013-12-02 17:00:28