File permission issue with Mac/Windows when using git

后端 未结 2 1073
梦毁少年i
梦毁少年i 2021-01-05 01:29

I ran the following code to pull files from windows git repository.

git pull /Volumes/sucho/Desktop/git/setup

And I connect the Windows dir

相关标签:
2条回答
  • 2021-01-05 02:19

    This isn't really answering your original question, but I hope to highlight another issue I ran into when attempting to trying @drewag's proposed solution...

    Another issue I ran into when attempting to ignore file permissions, regardless of whether it was on a Windows or Mac machine (more prevelant on the Windows machine!), was the problem global vs. project-level configurations.

    Running this command did not affect the .gitconfig file in my C:\Users\Username folder:

     git config core.filemode false
    

    Although adding the --global flag did affect the change I was looking for:

     git config --global core.filemode false
    

    Hope this helps someone solve some of their headaches!

    0 讨论(0)
  • 2021-01-05 02:32

    If you don't care about file permissions, you can just tell your repository to ignore file permission:

    git config core.filemode false
    
    0 讨论(0)
提交回复
热议问题