| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-fetch-pack(1) |
| 2 | ================= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 6 | git-fetch-pack - Receive missing objects from another repository |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
| Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 11 | [verse] |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 12 | 'git fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] [--no-progress] [-v] [<host>:]<directory> [<refs>...] |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 16 | Usually you would want to use 'git fetch', which is a |
| Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 17 | higher level wrapper of this command, instead. |
| Junio C Hamano | e58607f | 2007-01-17 23:27:45 | [diff] [blame] | 18 | |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 19 | Invokes 'git-upload-pack' on a possibly remote repository |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 20 | and asks it to send objects missing from this repository, to |
| 21 | update the named heads. The list of commits available locally |
| Junio C Hamano | 4fdccb2 | 2010-02-19 09:58:14 | [diff] [blame] | 22 | is found out by scanning the local refs/ hierarchy and sent to |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 23 | 'git-upload-pack' running on the other end. |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 24 | |
| 25 | This command degenerates to download everything to complete the |
| 26 | asked refs from the remote side when the local side does not |
| 27 | have a common ancestor commit. |
| 28 | |
| 29 | |
| 30 | OPTIONS |
| 31 | ------- |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 32 | --all:: |
| Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 33 | Fetch all remote refs. |
| 34 | |
| Junio C Hamano | 18b647e | 2012-04-24 22:16:19 | [diff] [blame] | 35 | --stdin:: |
| 36 | Take the list of refs from stdin, one per line. If there |
| 37 | are refs specified on the command line in addition to this |
| 38 | option, then the refs from stdin are processed after those |
| 39 | on the command line. |
| 40 | + |
| 41 | If '--stateless-rpc' is specified together with this option then |
| 42 | the list of refs must be in packet format (pkt-line). Each ref must |
| 43 | be in a separate packet, and the list must end with a flush packet. |
| 44 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 45 | -q:: |
| 46 | --quiet:: |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 47 | Pass '-q' flag to 'git unpack-objects'; this makes the |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | cloning process less verbose. |
| 49 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 50 | -k:: |
| 51 | --keep:: |
| Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 52 | Do not invoke 'git unpack-objects' on received data, but |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 53 | create a single packfile out of it instead, and store it |
| Junio C Hamano | 0d3c815 | 2006-11-08 01:33:41 | [diff] [blame] | 54 | in the object database. If provided twice then the pack is |
| 55 | locked against repacking. |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 57 | --thin:: |
| Junio C Hamano | 4fdccb2 | 2010-02-19 09:58:14 | [diff] [blame] | 58 | Fetch a "thin" pack, which records objects in deltified form based |
| 59 | on objects not included in the pack to reduce network traffic. |
| Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 60 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 61 | --include-tag:: |
| Junio C Hamano | bb34317 | 2008-03-09 10:39:09 | [diff] [blame] | 62 | If the remote side supports it, annotated tags objects will |
| 63 | be downloaded on the same connection as the other objects if |
| 64 | the object the tag references is downloaded. The caller must |
| 65 | otherwise determine the tags this option made available. |
| 66 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 67 | --upload-pack=<git-upload-pack>:: |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 68 | Use this to specify the path to 'git-upload-pack' on the |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 69 | remote side, if is not found on your $PATH. |
| 70 | Installations of sshd ignores the user's environment |
| 71 | setup scripts for login shells (e.g. .bash_profile) and |
| 72 | your privately installed git may not be found on the system |
| 73 | default $PATH. Another workaround suggested is to set |
| 74 | up your $PATH in ".bashrc", but this flag is for people |
| 75 | who do not want to pay the overhead for non-interactive |
| 76 | shells by having a lean .bashrc file (they set most of |
| 77 | the things up in .bash_profile). |
| 78 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 79 | --exec=<git-upload-pack>:: |
| Junio C Hamano | fa0d4cf | 2007-01-25 02:23:58 | [diff] [blame] | 80 | Same as \--upload-pack=<git-upload-pack>. |
| 81 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 82 | --depth=<n>:: |
| Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 83 | Limit fetching to ancestor-chains not longer than n. |
| 84 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 85 | --no-progress:: |
| Junio C Hamano | aa83a7d | 2007-03-05 02:37:29 | [diff] [blame] | 86 | Do not show the progress. |
| 87 | |
| Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 88 | -v:: |
| Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 89 | Run verbosely. |
| 90 | |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 91 | <host>:: |
| 92 | A remote host that houses the repository. When this |
| Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 93 | part is specified, 'git-upload-pack' is invoked via |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 94 | ssh. |
| 95 | |
| 96 | <directory>:: |
| 97 | The repository to sync from. |
| 98 | |
| 99 | <refs>...:: |
| 100 | The remote heads to update from. This is relative to |
| 101 | $GIT_DIR (e.g. "HEAD", "refs/heads/master"). When |
| 102 | unspecified, update from all heads the remote side has. |
| 103 | |
| Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 104 | GIT |
| 105 | --- |
| Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 106 | Part of the linkgit:git[1] suite |