Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-ls-remote(1) |
| 2 | ================ |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 6 | git-ls-remote - List references in a remote repository |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 12 | 'git ls-remote' [--heads] [--tags] [-u <exec> | --upload-pack <exec>] |
Junio C Hamano | 2a294cd | 2011-05-23 23:06:31 | [diff] [blame] | 13 | [--exit-code] <repository> [<refs>...] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 14 | |
| 15 | DESCRIPTION |
| 16 | ----------- |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 17 | Displays references available in a remote repository along with the associated |
| 18 | commit IDs. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 19 | |
| 20 | |
| 21 | OPTIONS |
| 22 | ------- |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 23 | -h:: |
| 24 | --heads:: |
| 25 | -t:: |
| 26 | --tags:: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 27 | Limit to only refs/heads and refs/tags, respectively. |
| 28 | These options are _not_ mutually exclusive; when given |
| 29 | both, references stored in refs/heads and refs/tags are |
| 30 | displayed. |
| 31 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 32 | -u <exec>:: |
| 33 | --upload-pack=<exec>:: |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 34 | Specify the full path of 'git-upload-pack' on the remote |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 35 | host. This allows listing references from repositories accessed via |
Junio C Hamano | f9771f6 | 2007-01-17 17:42:30 | [diff] [blame] | 36 | SSH and where the SSH daemon does not use the PATH configured by the |
Junio C Hamano | 1fbbbc1 | 2007-12-18 07:01:27 | [diff] [blame] | 37 | user. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 38 | |
Junio C Hamano | 2a294cd | 2011-05-23 23:06:31 | [diff] [blame] | 39 | --exit-code:: |
| 40 | Exit with status "2" when no matching refs are found in the remote |
| 41 | repository. Usually the command exits with status "0" to indicate |
| 42 | it successfully talked with the remote repository, whether it |
| 43 | found any matching refs. |
| 44 | |
Junio C Hamano | f76c10b | 2012-09-14 20:11:04 | [diff] [blame] | 45 | --get-url:: |
| 46 | Expand the URL of the given remote repository taking into account any |
| 47 | "url.<base>.insteadOf" config setting (See linkgit:git-config[1]) and |
| 48 | exit without talking to the remote. |
| 49 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 50 | <repository>:: |
| 51 | Location of the repository. The shorthand defined in |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 52 | $GIT_DIR/branches/ can be used. Use "." (dot) to list references in |
| 53 | the local repository. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 54 | |
| 55 | <refs>...:: |
| 56 | When unspecified, all references, after filtering done |
| 57 | with --heads and --tags, are shown. When <refs>... are |
| 58 | specified, only references matching the given patterns |
| 59 | are displayed. |
| 60 | |
| 61 | EXAMPLES |
| 62 | -------- |
| 63 | |
| 64 | $ git ls-remote --tags ./. |
| 65 | d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99 |
| 66 | f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1 |
| 67 | 7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3 |
| 68 | c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2 |
| 69 | 0918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub |
| 70 | $ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc |
| 71 | 5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master |
| 72 | c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu |
| 73 | b1d096f2926c4e37c9c0b6a7bf2119bedaa277cb refs/heads/rc |
| 74 | $ echo http://www.kernel.org/pub/scm/git/git.git >.git/branches/public |
| 75 | $ git ls-remote --tags public v\* |
| 76 | d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99 |
| 77 | f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1 |
| 78 | c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2 |
| 79 | 7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3 |
| 80 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 81 | GIT |
| 82 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 83 | Part of the linkgit:git[1] suite |