付费用户可以使用现成的方案, 地址见 链接
但是私有 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 会自动同步, 可以节约很多时间
来源: http://www.bubuko.com/infodetail-2977456.html