List of remotes for a git repository?
I have a git repository. This repo has multiple remote repositories (I think). How can I get a list of the remote repositories that belong to said repo? Some thing like git list --origins
or something like that?
You can get a list of any configured remote urls with the command git remote -v
.
This will give you something like the following:
base /home/***/htdocs/base (fetch)
base /home/***/htdocs/base (push)
origin git@bitbucket.org:*** (fetch)
origin git@bitbucket.org:*** (push)
如果你只需要远程仓库的名字(而不是其他任何数据),一个简单的git remote
就足够了。
$ git remote
iqandreas
octopress
origin
FWIW, I have exactly the same question, but I could not find the answer here. It's probably not portable, but at least for gitolite, I can run the following to get what I want:
$ ssh git@git.xxx.com info
hello akim, this is gitolite 2.3-1 (Debian) running on git 1.7.10.4
the gitolite config gives you the following access:
R W android
R W bistro
R W checkpn
...
链接地址: http://www.djcxy.com/p/43608.html
上一篇: 二进制信号量与互斥量的区别
下一篇: git仓库的远程列表?