git remote用法总结

源: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的信息。

猜你喜欢

转载自mauersu.iteye.com/blog/2090542
今日推荐