gitlab 添加多个仓库

参考博客地址

git同一项目使用多个远程仓库

使用的远程github仓库地址

ActivityResultLauncher

1、创建gitlab空白仓库 && clone下来
git clone [email protected]:gao/ActivityResultLauncher.git

进入到自己的ActivityResultLauncher目录,打开git命令窗口

2、添加远程GitHub仓库
git remote add github_activityResultLauncher https://github.com/DylanCaiCoding/ActivityResultLauncher.git  

github_activityResultLauncher 是我为远端GitHub仓库取的仓库名字

3、拉取远端仓库代码
 git pull github_activityResultLauncher master

master 指明我需要拉取远端的master分支

4、提交代码到自己的仓库
git add .
git commit -m "init"
git push origin master

你可能感兴趣的:(gitlab 添加多个仓库)