【问题标题】:Make a local Git repo from master based with Zend Repo as Origin使用 Zend Repo 作为 Origin 从 master 创建一个本地 Git repo
【发布时间】:2014-06-17 15:30:38
【问题描述】:

我想在我们运行主分支和测试站点的测试服务器上克隆主分支。这个 repo 是一个 Zend PHP 框架应用程序。在配置文件@/home/me/public_html/domain.com/ZendSkeletonApplication/.git/config我现在有:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git://github.com/zendframework/ZendSkeletonApplication.git
[branch "master"]
    remote = origin
    merge = refs/heads/master

我正在考虑使用 SSH 进行我的第一个 git 克隆。我觉得应该是这样的

git clone me@domain.com:~/public_html/site.com/ZendSkeletonApplication/project.git。但我当然不想复制 Zend 框架 repo,而是复制 master 分支。我如何使用 SSH 做到这一点?仓库名称是什么?

【问题讨论】:

  • 似乎 repo 还没有描述:cat description Unnamed repository; edit this file 'description' to name the repository.

标签: git zend-framework ssh git-clone


【解决方案1】:

网址应该是:

me@domain.com:~/public_html/domain.com/ZendSkeletonApplication

(假设您有 ssh me@domain.com 工作,并且 git 是该 ssh 会话中的已知命令)

这将克隆所有内容,但检查 master 分支。

【讨论】:

  • 非常感谢!比我想象的要容易。
猜你喜欢
  • 2021-07-03
  • 2017-04-06
  • 2018-07-05
  • 2014-11-01
  • 1970-01-01
  • 1970-01-01
  • 2023-04-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多