Git

git使用多个源和多个分支

admin
2023-09-19 / 0 评论 / 15 阅读 / 正在检测是否收录...

1.查看当前远程仓库

git remote -v

2.添加其他远程仓库,如gitee

git remote add gitee https://xxxxxxx
# 其中gitee为远程仓库名,类似于默认的origin

3.拉去新的源数据

git fetch gitee

4.切换到新的分支

git checkout mybranck

5.单独修改

git remote set-url --push origin https://github.com/username/repo.git
git remote set-url --fetch origin https://github.com/username/repo.git
0

评论 (0)

取消