Overview
How to examine a remote with git remote and git ls-remote.
Examine branches
Local branches:
$ git branch * master $
Remote branches:
$ git branch -r origin/HEAD -> origin/master origin/master $
All branches:
$ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master $
Verbose branches:
$ git branch -v * master 610cd4eadec4 Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip $
$ git branch -vv
* master 610cd4eadec4 [origin/master] Merge ...
^^^^^^^^^^^^^^^
$
Examine remotes
git remote
$ git remote origin $
$ git remote -v origin https://github.com/torvalds/linux (fetch) origin https://github.com/torvalds/linux (push) $
$ git remote show origin
* remote origin
Fetch URL: https://github.com/torvalds/linux
Push URL: https://github.com/torvalds/linux
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
$
git ls-remote
Lots of options here …
$ git ls-remote origin
610cd4eadec4f97acd25d3108b0e50d1362b3319 HEAD
610cd4eadec4f97acd25d3108b0e50d1362b3319 refs/heads/master
51b8b4fb32271d39fbdd760397406177b2b0fd36 refs/pull/10/head
02b5a6031ba7a8cbfde5d65ff9e13ecdbc4a92ca refs/pull/100/head
98eae511bd1cf61ba206c2a8efa896f22c52e005 refs/pull/100/merge
5c91199a463b2f3f6e2a256373cc86cde828c029 refs/pull/101/merge
c0cae3784a6535760fce053bb1df01caf6ea69cb refs/pull/102/head
5e2308a3e03994015082ff1cbda5ad6ba579a591 refs/pull/102/merge
0131d367fa05d8bf72f2c34140ce64a9b98b5278 refs/pull/103/head
b7f339a7f63d335135b76cfc1b28b77f3be622d4 refs/pull/103/merge
... snip ...
5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c refs/tags/v2.6.11
c39ae07f393806ccf406ef966e9a15afc43cc36a refs/tags/v2.6.11^{}
5dc01c595e6c6ec9ccda4f6f69c131c0dd945f8c refs/tags/v2.6.11-tree
c39ae07f393806ccf406ef966e9a15afc43cc36a refs/tags/v2.6.11-tree^{}
26791a8bcf0e6d33f43aef7682bdb555236d56de refs/tags/v2.6.12
... snip ...
$
You can also refer to a URL:
$ git ls-remote https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git