How can I discard modified files?

后端 未结 10 742
甜味超标
甜味超标 2020-12-13 18:00

This is a Linux 2.6 kernel repository. I git clone it to my local host.

After that. I didn\'t make any change. But when I \"git status\". I found 13 modified files.

10条回答
  •  感情败类
    2020-12-13 18:15

    The question is similar to Strange behaviour of Git: mysterious changes cannot be undone

    You need a case-insensitive filesystem. If your PC is Apple MAC like me, you can create Case-sensitive disk.

    hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 25g ~/android.dmg
    
    hdiutil resize -size g ~/android.dmg.sparseimage
    
    # mount the android file image
    function mountAndroid { hdiutil attach ~/android.dmg.sparseimage -mountpoint /Volumes/android; }
    
    # unmount the android file image
    function umountAndroid() { hdiutil detach /Volumes/android; }
    

提交回复
热议问题