git关联远程分支(Git新手入门一分钟上手系列)(1)

  1. 关联远程分支

1)打开Git_bash窗口(window下)

2)输入如下命令:

git remote add origin git@github.com:git_username/repository_name.git

git关联远程分支(Git新手入门一分钟上手系列)(2)

远程分支关联

注意:origin代表远程仓库 后面紧接着仓库地址

2.切换关联的远程分支

  1. 取消关联的远程分支

    git remote remove origin

  2. 关联到新的远程分支(两种方式可选)

    1)git branch --set-upstream-to origin/develop develop

    //或者

    2)git remote add origin git@github.com:git_username/repository_name.git

,