仓库 test_a,分支 developer_test
仓库 test_b
将仓库test_a的developer_test分支提交到仓库test_b
ps: 如果使用ssh方式拉取,需要配置,可以参考该文档:https://blog.csdn.net/D939030515/article/details/105494743
1. 先将仓库test_a拉取到本地
git clone https://gitee.com/*****/test_a.git
2. 创建一个分支,起点 master(只是用来测试,已有分支不用该步骤)
3. 添加test_b的远程地址
git remote add repo-test_b https://gitee.com/*****/test_b.git
可以看到已经有该远程路径
4. 推送developer_test分支到test_b
git push repo-test_b developer_test
如果使用另外的分支名,例如branch_b,在分支后面使用 冒号加新的分支名称
git push repo-test_b developer_test:branch_b
5.如果远程已经有该分支,推送可能会提示错误,需要先从远程拉取
6.本地merge以后,可以提交