首页 > 其他 > 详细

使用gitlab时候 fork仓库不会实时从主仓库更新解决方案

时间:2019-03-06 01:31:40      阅读:473      评论:0      收藏:0      [点我收藏+]

付费用户可以使用现成的方案,地址见 链接

但是私有gitlab时候,需要手动进行如下操作

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

3. Updating your fork from original repo to keep up with their changes:

git pull upstream master



原文操作见链接

更多相关链接
https://stackoverflow.com/questions/3903817/pull-new-updates-from-original-github-repository-into-forked-github-repository/3903835#3903835
https://help.github.com/en/articles/fork-a-repo


gitlab和github 在这方面上还是有些不同,github会自动同步,可以节约很多时间

使用gitlab时候 fork仓库不会实时从主仓库更新解决方案

原文:https://www.cnblogs.com/monley/p/10480730.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!