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

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

但是私有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会自动同步,可以节约很多时间

posted on 2019-03-05 23:53  MonLey  阅读(710)  评论(0编辑  收藏  举报

导航