Documentation / urls-remotes.txton commit sha1-lookup: make selection of 'middle' less aggressive (12ecb01)
   1include::urls.txt[]
   2
   3REMOTES
   4-------
   5
   6In addition to the above, as a short-hand, the name of a
   7file in `$GIT_DIR/remotes` directory can be given; the
   8named file should be in the following format:
   9
  10------------
  11        URL: one of the above URL format
  12        Push: <refspec>
  13        Pull: <refspec>
  14
  15------------
  16
  17Then such a short-hand is specified in place of
  18<repository> without <refspec> parameters on the command
  19line, <refspec> specified on `Push:` lines or `Pull:`
  20lines are used for `git-push` and `git-fetch`/`git-pull`,
  21respectively.  Multiple `Push:` and `Pull:` lines may
  22be specified for additional branch mappings.
  23
  24Or, equivalently, in the `$GIT_DIR/config` (note the use
  25of `fetch` instead of `Pull:`):
  26
  27------------
  28        [remote "<remote>"]
  29                url = <url>
  30                push = <refspec>
  31                fetch = <refspec>
  32
  33------------
  34
  35The name of a file in `$GIT_DIR/branches` directory can be
  36specified as an older notation short-hand; the named
  37file should contain a single line, a URL in one of the
  38above formats, optionally followed by a hash `#` and the
  39name of remote head (URL fragment notation).
  40`$GIT_DIR/branches/<remote>` file that stores a <url>
  41without the fragment is equivalent to have this in the
  42corresponding file in the `$GIT_DIR/remotes/` directory.
  43
  44------------
  45        URL: <url>
  46        Pull: refs/heads/master:<remote>
  47
  48------------
  49
  50while having `<url>#<head>` is equivalent to
  51
  52------------
  53        URL: <url>
  54        Pull: refs/heads/<head>:<remote>
  55------------