示例:https://github.com/ChinaSilence/spring-cloud-config-admin Fork => https://github.com/dyc87112/spring-cloud-config-admin
1、clone 自己账号的项目
git clone https://github.com/ChinaSilence/spring-cloud-config-admin.git
cd spring-cloud-config-admin
2、增加原始项目远程分支到本地
查看远程分支
➜ git remote -v
origin https://github.com/ChinaSilence/spring-cloud-config-admin.git (fetch)
origin https://github.com/ChinaSilence/spring-cloud-config-admin.git (push)
如果没有原始项目远程分支,则需要增加:
git remote add didispace https://github.com/dyc87112/spring-cloud-config-admin.git
确认远程分支列表:
➜ git remote -v
didispace https://github.com/dyc87112/spring-cloud-config-admin.git (fetch)
didispace https://github.com/dyc87112/spring-cloud-config-admin.git (push)
origin https://github.com/ChinaSilence/spring-cloud-config-admin.git (fetch)
origin https://github.com/ChinaSilence/spring-cloud-config-admin.git (push)
3、fetch 原始项目分支的新版本到本地
git fetch didispace
4、合并两个版本的代码
git merge didispace/master
5、push 最新代码到自己账号
git push origin master
网友评论