2011-06-09 50 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