简体   繁体   English

在Linux / Windows dualboot之间在NTFS分区上共享git repo

[英]Sharing git repo on NTFS partition between Linux/Windows dualboot

I'm developing an (Qt) application which should run under Windows and Linux. 我正在开发一个应该在Windows和Linux下运行的(Qt)应用程序。 So, I want to be able to develop under Windows and Linux, too. 所以,我希望能够在Windows和Linux下开发。

Therefore I have stored my project (as git repo) on a NTFS partition which I mount under Linux (Ubuntu 13.10). 因此,我将我的项目(作为git repo)存储在我在Linux下安装的NTFS分区(Ubuntu 13.10)。 To avoid the rights problem of the compiled executable I set the shadow build directory to my home folder under Linux. 为了避免编译的可执行文件的权限问题,我将阴影构建目录设置为Linux下的主文件夹。

This approach work quit good so far. 到目前为止,这种方法的工作很好。 But there are some effects that make me worry: If I stage some changed files (with smartgit), smartgit doesn't reflect that I have stage them. 但有一些影响让我担心:如果我暂存一些已更改的文件(使用smartgit),那么smartgit并不反映我已经将它们暂存。 They are still displayed as unstaged 它们仍然显示为未分级

Similar thing when commiting: After the commit, the commited changes are still display as if they where not commit. 提交时类似的事情:提交后,提交的更改仍然显示为不提交。 But in the log I can see they are commited. 但是在日志中我可以看到它们被提交了。 Closing an reopen the repo "solves" this issues or is a workaround at least. 关闭重新开放回购“解决”这个问题或至少是一个解决方法。

But I have concerns that I break my repo using it on a NTFS partition under Linux. 但我担心在Linux下的NTFS分区上使用它来破坏我的仓库。 Or is there no risk that my repo is getting corrupted one day using it that way? 或者,有一天我的回购公司没有被这样破坏的风险吗?

This answer has been given by Fco P. on the askubuntu question mirror. 这个答案由Fco P.在askubuntu问号镜子上给出。 This happens because Windows and Linux deal with file permissions differently. 发生这种情况是因为Windows和Linux以不同方式处理文件权限。 Use 采用

git config core.filemode false

to disable git tracking file permissions and solve this issue. 禁用git跟踪文件权限并解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM