Narek
Narek

Reputation: 39881

How to use the same repo on external FAT drive on OSX and Windows?

I have to work on the same project in multiple systems for some reason. So I took external drive with FAT filesystem and copied my repo from OSX to the external drive. Now I want to be able to use GIT to work on that project from both systems OSX and Windows. But first I have problems with file permissions as FAT does not have permissions, the file permissions were changed when I was doing diff on both platforms. This was easily solved when I set:

git config core.fileMode false

But I cannot solve problems with symbolic links. I need them to be unchanged as I don't need them on Windows. As far as FAT does not support symbolic links, when I copied files form Mac to external FAT HDD something is changed in those files. Now I get diff only in Windows related to symbolic links. But I don't get any diff on OSX. How this can be? Symbolic link is also a file right? Now I don't understand the file is changed or no? Systems tell me different things? How to solve this problem?

Tries using this:

git config --global core.symlink false

but it didn't help, as, I guess, if works when you checkout. But I have only one repo and I don't do checkout to use it on Windows. I just use it from my external HDD.

Upvotes: 0

Views: 105

Answers (1)

Yawar
Yawar

Reputation: 11627

The correct way to handle symlinks in git between multiple systems is to use it the way it was designed to be used, which is to have multiple clones and push and pull between them. So you'd have your original clone on the external disk, and one clone on each computer. When you push-pull between them, git will update the symlinks: How does git handle symbolic links?

Upvotes: 1

Related Questions