我在本身的vekko/RuoYi库改啊改,某一天源库y_project/RuoYi更新了,我怎么同步源库过来?
进入本身本地库中经过git remote -v 查看源信息
G:\vekko_cc_projects\RuoYi>git remote -v origin https://gitee.com/vekko/RuoYi.git (fetch) origin https://gitee.com/vekko/RuoYi.git (push)
fetch 和push 都是本身的源,全部咱们要添加repo的源
添加上游repo源git
G:\vekko_cc_projects\RuoYi>git remote add upstream https://gitee.com/y_project/RuoYi.git
注:删除为git remote remove upstreamsegmentfault
而后再看一下源信息,能够看到上游源已经添加进来了fetch
G:\vekko_cc_projects\RuoYi>git remote -v origin https://gitee.com/vekko/RuoYi.git (fetch) origin https://gitee.com/vekko/RuoYi.git (push) upstream https://gitee.com/y_project/RuoYi.git (fetch) upstream https://gitee.com/y_project/RuoYi.git (push)
G:\vekko_cc_projects\RuoYi>git fetch upstream From https://gitee.com/y_project/RuoYi * [new branch] master -> upstream/master
G:\vekko_cc_projects\RuoYi>git merge upstream/master Already up to date.
git push origin master
邀请你一块儿读 Redis