我在本身的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