简体   繁体   中英

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

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM