The Curious Case of Eclipse, Msysgit, and the Obstinate Dot Files

Just a quick tip if you are having problems with Eclipse, FDT or other Eclipse based tool and writing to dot files cloned from a git repository.

If you are seeing messages about not have permission to write to .project, .as3_classpath and so on, there’s a reasonable chance that msysgit (or potentially TortoiseGit) automatically set the dot files to hidden to mimic what you see on a unix based machine. While this is nice, for some reason Eclipse, or possibly the underlying Java file calls, can’t write to hidden files on Windows so you get access denied messages.

Fortunately, the solution is very simple. Open up a git Bash prompt, and enter this:

git config --global core.hidedotfiles false

And that’s it. With core.hidedotfiles set to false, msysgit will no longer set the hidden property on dot files, and Eclipse should be ready to rock.

Of course, this only affects newly fetched files, so if you want to clear the hidden flag on existing files, jump into a cmd prompt (or this may work from the git bash prompt) and type:

cd folder_containing_the_repository
attrib /s /d -H *