MSysGit is adding a cygwin prefix to non-cygwin paths and then failing to find its current directory

0

I've had Cygwin's git installed on my Windows 7 64 bit machine and it's been working fine. However, I've found myself wanting to be able to use git from non-Cygwin programs (in particular, Windows Vim). I've thus installed MSysGit, which is found fine by Windows programs, but completely fails to work because it adds a Cygwin prefix to every path it touches and then complains when it can't find a git repository. Here's an example run in Git Bash:

user@LT ~/vimfiles (master)
$ ls -a
.   .git        .gitmodules  README.md  autoload  colors  vimrc
..  .gitignore  .netrwhist   UltiSnips  bundle    syntax  vimundo

user@LT ~/vimfiles (master)
$ git status
fatal: Not a git repository: /cygdrive/c/Users/user/vimfiles/.git/modules/bundle/fugitive

user@LT ~vimfiles (master)
$ pwd
/c/Users/user/vimfiles

How can I fix things so that MSysGit will stop breaking itself and start using correct paths?

8bittree

Posted 2014-06-23T14:47:55.720

Reputation: 2 595

Answers

0

I was able to fix the problem by checking out a fresh copy of the repository with MSysGit, rather than trying to use the old one, which was originally checked out with Cygwin's git.

While this is an adequate solution for this case, I'd still be interested in learning how to make a repository compatible with both.

8bittree

Posted 2014-06-23T14:47:55.720

Reputation: 2 595