参考链接
将远程原始repo合并到远程fork repo的本地repo后推送到远程fork repo
- clone远程fork repo
- 添加远程原始repo为upstream
- fetch&merge远程原始repo的分支到本地分支
- push到远程fork repo分支
具体操作
- Set up Git
- Create a local clone of your fork
1
|
git clone https://github.com/YOUR-USERNAME/REPO_NAME.git
|
- Configure Git to sync your fork with the original repository
1
2
3
4
5
6
|
# check the current configured remote repository for your fork.
git remote -v
# add upstream
git remote add upstream https://github.com/ORIGINAL-USERNAME/REPO_NAME.git
# verify the new upstream repository
git remote -v
|
- Fetch and merge original repository into your local repository
1
2
|
git fetch upstream
git merge upstream/master
|
- push to your remote fork repo