本文介绍了git push origin master:'D:/ Projects / TheProject'不是一个git命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两台机器运行cygwin ssh与msysgit。我已克隆一个git存储库从我的桌面到我的笔记本电脑,如。这使我有一个.git /配置如下:

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

git pull origin工作伟大。但是如果我尝试git push origin 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

有关此修复程序的任何想法? / p>

Any ideas about a fix for this?

推荐答案

我改用了cygwin的git版本,如ak2的注释。这一切都现在工作。

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

但我记得为什么我避免cygwin git在第一个地方...它常常(一天几次)错误时使用git svn。我最终必须杀掉所有我的cygwin进程和运行ash rebaseall来修复它,或重新启动我的机器。这很令人沮丧。

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.

这篇关于git push origin master:'D:/ Projects / TheProject'不是一个git命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 20:08