欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

git remote用法总结

程序员文章站 2022-07-14 10:56:13
...
源:http://blog.csdn.net/xiruanliuwei/article/details/6919416
评:
git remote

git remote 不带参数,列出已经存在的远程分支,例如:
#git remote
origin_apps

git remote -v | --verbose 列出详细信息,在每一个名字后面列出其远程url,例如:
#git remote -v
origin_apps     gitolite@scm:apps/Welcome.git (fetch)
origin_apps     gitolite@scm:apps/Welcome.git (push)
需要注意的是,如果有子命令,-v | --verbose需要放在git remote与子命令中间。

git remote add name url 在url创建名字为name的仓库(Adds a remote named <name> for the repository at <url>)
name为远程仓库的名字

git remote show name 必须要带name,否则git remote show的作用就是git remote,给出remote name的信息。