Search code examples
gitcygwinmsysgit

git push origin master: 'D:/Projects/TheProject' is not a git command


I've got two machines running cygwin ssh with msysgit. I've cloned a git repository from my desktop to my laptop as described in 'X' does not appear to be a git repository (I'm sure the path is correct). This leaves me with a .git/config as follows:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = GitServer:D:/Projects/TheProject
[branch "master"]
    remote = origin
    merge = refs/heads/master

The clone worked great. git pull origin works great. But if I try to "git push origin master" I get the following error:

$ git push origin master
MyUser@TheDesktop's password:
git: 'D:/Projects/TheProject' is not a git command. See 'git --help'.
fatal: The remote end hung up unexpectedly

Any ideas about a fix for this?


Solution

  • I've switched to using cygwin's version of git, as mentioned in ak2's comment. It all works now.

    But I do remember why I avoided cygwin git in the first place... it often (several times a day) errors when using git svn. I end up having to kill off all my cygwin processes and running "ash rebaseall" to fix it, or rebooting my machine. It's very frustrating.