This is an old revision of the document!


How to examine a remote with git remote and git ls-remote.

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 ...
                      ^^^^^^^^^^^^^^^
$
$ git remote
origin
$
$ git remote -v
origin	https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ (fetch)
origin	https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ (push)
$
$ git remote show origin
* remote origin
  Fetch URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
  Push  URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
  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_remote_ls_remote.1552038557.txt.gz
  • Last modified: 2019/03/08 09:49
  • by rpjday