Git同步远程仓库和自己的本地仓库(private fork)
有时,比起fork他人的git,我们更想建立自己的git仓库,并与他人的远程仓库进行同步。
此外,fork git是public的,但有时我们更想要private fork,那就可以使用这种办法.
初始化:添加远程仓库 (public 可以换成自己想起的名字)
git remote add public git://your_remote_git.git
之后每次想获得远程仓库的更新时都可以进行下述操作:
fetch 远程仓库
git fetch public
查看远程branch
原创
2021-10-27 19:20:33 ·
1362 阅读 ·
0 评论