path: root/Documentation/git-ls-remote.txt
diff options
authorThomas Gummerer <>2016-01-18 23:20:50 (GMT)
committerJunio C Hamano <>2016-01-19 18:07:56 (GMT)
commit99c08d4eb28f0525d71125e7903fd4462bfd6787 (patch)
tree3b08569626d8d45f67497d3a4acc5d4605e2e0f9 /Documentation/git-ls-remote.txt
parentba5f28bf79ea652fbe2be12f5ca6b351bb6ad591 (diff)
ls-remote: add support for showing symrefs
Sometimes it's useful to know the main branch of a git repository without actually downloading the repository. This can be done by looking at the symrefs stored in the remote repository. Currently git doesn't provide a simple way to show the symrefs stored on the remote repository, even though the information is available. Add a --symref command line argument to the ls-remote command, which shows the symrefs in the remote repository. While there, replace a literal tab in the format string with \t to make it more obvious to the reader. Suggested-by: pedro rijo <> Signed-off-by: Thomas Gummerer <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-ls-remote.txt')
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 453e93c..5f2628c 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -10,7 +10,8 @@ SYNOPSIS
'git ls-remote' [--heads] [--tags] [--refs] [--upload-pack=<exec>]
- [-q | --quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]
+ [-q | --quiet] [--exit-code] [--get-url]
+ [--symref] [<repository> [<refs>...]]
@@ -53,6 +54,12 @@ OPTIONS
"url.<base>.insteadOf" config setting (See linkgit:git-config[1]) and
exit without talking to the remote.
+ In addition to the object pointed by it, show the underlying
+ ref pointed by it when showing a symbolic ref. Currently,
+ upload-pack only shows the symref HEAD, so it will be the only
+ one shown by ls-remote.
The "remote" repository to query. This parameter can be
either a URL or the name of a remote (see the GIT URLS and