3

I'm trying to find a way to disable git from following symbolic links on Windows 7 while adding/committing files the repo. I've tried setting config.symlinks to false (git config --bool core.symlinks false). Is there a simple solution to disable this behavior?

John Himmelman
  • 21,504
  • 22
  • 65
  • 80
  • which git are you using? Cygwin or another one? – rlc Apr 05 '11 at 18:00
  • @Ronald Currently using Cygwin. Git version 1.7.4.mysysgit.0 – John Himmelman Apr 05 '11 at 18:02
  • 2
    msysgit isn't the Cygwin version - it's the MSYS version (MSYS is the fork of Cygwin that ships with MinGW). AFAIK, there's no switch to turn following symlinks off, but IIRC Cygwin symlinks != Windows symlinks, so you might be able to play with that.. – rlc Apr 05 '11 at 18:18
  • @adymitruk I'm linking to a folder that contains all of our client side libraries. It provides instant access to our plugins/libs/etc in dev. – John Himmelman Apr 06 '11 at 15:10

1 Answers1

3

AFAIK, you can't easily do that on windows. However, you can simply modify your .git/info/exclude file to exclude this folder. It's more a workaround, but as you're using only one folder, it will work well (I've been using that for build folder, which I don't want to pollute my git status)

Bruce
  • 7,094
  • 1
  • 25
  • 42
  • 1
    I can't get this to work. Have have cloned a repository that has a dummy file (named src): `/path/src`. On Windows I have created a symbolic link: `mklink -d /path/src /otherplace/src` (but I of course had to delete the dummy src file first). In both my .gitignore and .git/info/exclude I have `/path/src/` and `/path/src` but I still get: `error: readlink("path/src"): Function not implemented error: unable to index file path/src fatal: updating files failed` any ideas? – Magnus Johansson Jul 30 '12 at 19:59