-
获取远程仓库的链接
https://gitee.com/yuanqi1215/test.git
-
在本地中克隆远程仓库(即下载代码到本地)
git clone https://gitee.com/yuanqi1215/test.git
如果需要clone某一分支,则
git clone -b yuanqi https://gitee.com/yuanqi1215/test.git
-
查看远程仓库地址
git remote -v
-
添加远程仓库
git remote add dev https://gitee.com/yuanqi1215/test.git
该命令是将上游远程仓库添加到仓库名为dev中
- 重命名远程仓库
git remote rename dev yuanqi
该命令是远程仓库名dev改名为yuanqi
- 删除远程仓库
git remote rm dev
该命令是将删除远程仓库名为dev的仓库