I've posted this question already stackoverflow but got no answer: click

Since I'm having this problem on Ubuntu I repost my question here. I hope this is not forbidden.

I'm developing an (Qt) application which should run under Windows and Linux. So, I want to be able to develop under Windows and Linux, too.

Therefore I have stored my project (as git repo) on a NTFS partition which I mount under Linux (Ubuntu 13.10). To avoid the rights problem of the compiled executable I set the shadow build directory to my home folder under 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. 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. Or is there no risk that my repo is getting corrupted one day using it that way?

  • You don't need Git repository sharing on the HDD. Just clone the repository again.
    – user45853
    Feb 19 '14 at 11:05
  • The repo is just local. So I have to share it on HDD. What I've currently done as workaround is mounted the NTFS partition on Ubuntu and cloned the repo to my home folder. But this results in unnecessary pull/push actions. And I have the same concerns breaking the (remote) repo by pushing to a NTFS partition on Linux. So using the same repo on both systems would provide a smoother workflow...
    – avb
    Feb 19 '14 at 11:12
  • Why not make a private repository on BitBucket (it's free)?
    – user45853
    Feb 19 '14 at 11:14
  • Not allowed by my business policy... And the problem with unnecessary pull/push actions is the same, plus Internet connection would be required....
    – avb
    Feb 19 '14 at 11:14
  • Maybe to make another partition that both file systems will see?
    – user45853
    Feb 19 '14 at 11:22

that happens because of the file mode. Windows and linux write files differently, so for both of them the files are constantly "new". type this in your directory:

git config core.filemode false

and the filesystem changes will dissapear from your index.

  • Note that on Linux, that command will fail with error: chmod on .git/config.lock failed: Operation not permitted, so it's necessary to edit .git/config file manually. Even after that it's still not possible to run git config.
    – user202729
    Feb 1 '20 at 2:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.