This is wrapping ugly, maybe resolve the file first, and then resolve the gitconfig.  That way a symlinked /etc/gitconfig is correctly followed if it came from Cygwin.

  File etc = new File(fs.resolve(prefix, "etc"));
  File config = new File(fs.resolve(etc, "config"));
  return new FileBasedConfig(parent, config, fs);