Make a local Git repo from master based with Zend Repo as Origin

余生长醉 提交于 2019-12-21 21:39:05

问题


I would like to make a clone of a master branch on the test server where we have the master branch and the test site running. This repo is a Zend PHP Framework Application. In the config file @ /home/me/public_html/domain.com/ZendSkeletonApplication/.git/config I have now:

[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

I was considering doing my first git clone using SSH ever. I think it should be something like

git clone me@domain.com:~/public_html/site.com/ZendSkeletonApplication/project.git. But of course I do not want to copy the Zend framework repo, but the master branch. How do I do that using SSH? What would be the repo name?


回答1:


The url should be:

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

(assuming that you have ssh me@domain.com works, and that git is a known command in that ssh session)

That will clone everything, but checkout the master branch.



来源:https://stackoverflow.com/questions/24257714/make-a-local-git-repo-from-master-based-with-zend-repo-as-origin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!