1.查看当前远程仓库地址:
git remote -v
2.设置新的仓库地址
git remote set-url origin http://.../xxx.git
ps: http://.../xxx.git 表示切换的远程仓库地址
至此,git操作之设置远程仓库地址结束,接下来记录一下切换分支的操作:
3.查看分支:
git branch -a //查看远程分支
git branch //查看本地分支
ps: 其中 remotes/*开头的表示远程分支,其他为本地分支
4.切换分支:
git checkout -b develop origin/develop
ps : develop 表示分支