Skip to content

remote

命令解释
git remote查看远程仓库
git remote -v显示所有远程仓库(含远程仓库的地址)
git remote show [remote]显示某个远程仓库的信息
git remote add [shortname] [url]给远程仓库[url]起名为[shortname],默认是origin.
例如提交到 Github:
$ git remote add origin git@github.com:tianqixin/runoob-git-test.git
$ git push -u origin master
git remote rm name删除远程仓库
git remote rename old_name new_name修改仓库名

请勿转载