步驟:
-
git remote -v
首先是否建立了主repo的遠(yuǎn)程源
如:
image.png
類(lèi)似這樣,只有自己的 fetch、push,就是沒(méi)有。
git remote add main https://github.com/quark-ui/quark-ui.git
那就需要添加主repo的源
main: 一個(gè)本地別名(upstream)(自己定義)
后邊的倉(cāng)庫(kù)地址,就是fork 別人的倉(cāng)庫(kù)地址-
git remote -v
查看是否添加上
如:
image.png
已經(jīng)添加上 git fetch maingit merge main/master
兩步合并變化
如果要?jiǎng)h除 upstream,執(zhí)行git remote rm [本地別名] 如:git remote rm main

