git 远程仓库

1.查看当前的远程库
git remote
git remote -v

2.添加远程仓库
git remote add [shortname] [url]

3.从远程仓库抓取数据
git fetch [remote-name]

4.推送数据到远程仓库
git push [remote-name] [branch-name]

5.查看远程仓库信息
git remote show [remote-name]

6.远程仓库的删除和重命名
git remote rename pb paul
git remote rm paul

7.更改远程仓库服务器地址
git remote origin set-url [url]

8.远程仓库版本回退
git push <仓库名> <分支名> -f

原文地址:https://www.cnblogs.com/fedorayang/p/6178205.html