【问题标题】:How to setup a remote for git that it's in my c disk (win vista)?如何为我的c盘中的git设置一个遥控器(win vista)?
【发布时间】:2012-10-14 05:57:55
【问题描述】:

我想知道如何在 windows 文件夹中创建遥控器,因为所有的 tuts 都向我展示了如何将遥控器放入远程服务器而不是文件夹。 http://elegantcode.com/2011/06/18/git-on-windows-creating-a-network-shared-central-repository/

【问题讨论】:

标签: git git-remote


【解决方案1】:

This example 显示了 C 盘上的远程示例:

git remote add origin c:/dropbox/repos/theAwesome

虽然下面的语法也应该起作用:

git remote add origin /C/dropbox/repos/theAwesome

【讨论】:

  • 使用这两个命令我得到相同的错误:致命:“'c:/folder' 似乎不是 git 存储库;致命:远程端意外挂断;”。在windows中使用“/”代替“\”是否正确?
  • @Totty 是的,你可以在 Windows 上使用 '/',因为 git 使用的是 msys (stackoverflow.com/questions/3144082/…)。您是否首先在 /c/folder 创建了一个 git 存储库?如“cd c:\folder”和“git init --bare
  • @Totty 在这种情况下,这可能是一个案例问题。因为路径是正确的,如本例所示:stackoverflow.com/a/9104446/6309。另一种选择:尝试克隆您的裸仓库,并检查git remote -v show 在您克隆的仓库中返回的内容..
猜你喜欢
  • 2011-11-25
  • 2014-12-09
  • 2014-02-27
  • 2011-02-17
  • 1970-01-01
  • 2014-08-11
  • 2014-10-28
  • 2012-10-09
  • 2016-11-08
相关资源
最近更新 更多