git fork
git fork
从源仓库拉下代码后发现需要创建自己的远程仓库
步骤
我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:
- 先fork (我github已经登陆所以直接在这fork)

然后点击 ssh
git remote add shenyuan git@gitlab.test.com:WP/develop/project.git
- 创建分支并推送到远程仓库
$ git remote -v
origin git@gitlab.test.com:zhangsan/project.git (fetch)
origin git@gitlab.test.com:zhangsan/project.git (push)
shenyuan git@gitlab.test.com:WP/develop/project.git (fetch)
shenyuan git@gitlab.test.com:WP/develop/project.git (push)
//shenyuan是我自己的远程仓库
//创建分支
$ git branch ysh
//切换分支
$ git checkout ysh
//推送本地分支到shenyuan并关联本地 ysh和远程的ysh
$ git push -u shenyuan ysh
//查看 看到 remotes/shenyuan/ysh 成功
$ git branch -a
develop
master
* ysh
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/shenyuan/develop
remotes/shenyuan/ysh
491

被折叠的 条评论
为什么被折叠?



