Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. |
Mike Frysinger | 7fa8eed | 2022-08-04 04:27:17 -0400 | [diff] [blame^] | 2 | .TH REPO "1" "August 2022" "repo sync" "Repo Manual" |
Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 3 | .SH NAME |
| 4 | repo \- repo sync - manual page for repo sync |
| 5 | .SH SYNOPSIS |
| 6 | .B repo |
| 7 | \fI\,sync \/\fR[\fI\,<project>\/\fR...] |
| 8 | .SH DESCRIPTION |
| 9 | Summary |
| 10 | .PP |
| 11 | Update working tree to the latest revision |
| 12 | .SH OPTIONS |
| 13 | .TP |
| 14 | \fB\-h\fR, \fB\-\-help\fR |
| 15 | show this help message and exit |
| 16 | .TP |
| 17 | \fB\-j\fR JOBS, \fB\-\-jobs\fR=\fI\,JOBS\/\fR |
Mike Frysinger | df8b1cb | 2021-07-26 15:59:20 -0400 | [diff] [blame] | 18 | number of jobs to run in parallel (default: based on |
| 19 | number of CPU cores) |
Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 20 | .TP |
| 21 | \fB\-\-jobs\-network\fR=\fI\,JOBS\/\fR |
| 22 | number of network jobs to run in parallel (defaults to |
Mike Frysinger | 7fa8eed | 2022-08-04 04:27:17 -0400 | [diff] [blame^] | 23 | \fB\-\-jobs\fR or 1) |
Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 24 | .TP |
| 25 | \fB\-\-jobs\-checkout\fR=\fI\,JOBS\/\fR |
| 26 | number of local checkout jobs to run in parallel |
Mike Frysinger | 7fa8eed | 2022-08-04 04:27:17 -0400 | [diff] [blame^] | 27 | (defaults to \fB\-\-jobs\fR or 8) |
Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 28 | .TP |
| 29 | \fB\-f\fR, \fB\-\-force\-broken\fR |
| 30 | obsolete option (to be deleted in the future) |
| 31 | .TP |
| 32 | \fB\-\-fail\-fast\fR |
| 33 | stop syncing after first error is hit |
| 34 | .TP |
| 35 | \fB\-\-force\-sync\fR |
| 36 | overwrite an existing git directory if it needs to |
| 37 | point to a different object directory. WARNING: this |
| 38 | may cause loss of data |
| 39 | .TP |
| 40 | \fB\-\-force\-remove\-dirty\fR |
| 41 | force remove projects with uncommitted modifications |
| 42 | if projects no longer exist in the manifest. WARNING: |
| 43 | this may cause loss of data |
| 44 | .TP |
| 45 | \fB\-l\fR, \fB\-\-local\-only\fR |
| 46 | only update working tree, don't fetch |
| 47 | .TP |
| 48 | \fB\-\-no\-manifest\-update\fR, \fB\-\-nmu\fR |
| 49 | use the existing manifest checkout as\-is. (do not |
| 50 | update to the latest revision) |
| 51 | .TP |
| 52 | \fB\-n\fR, \fB\-\-network\-only\fR |
| 53 | fetch only, don't update working tree |
| 54 | .TP |
| 55 | \fB\-d\fR, \fB\-\-detach\fR |
| 56 | detach projects back to manifest revision |
| 57 | .TP |
| 58 | \fB\-c\fR, \fB\-\-current\-branch\fR |
| 59 | fetch only current branch from server |
| 60 | .TP |
| 61 | \fB\-\-no\-current\-branch\fR |
| 62 | fetch all branches from server |
| 63 | .TP |
| 64 | \fB\-m\fR NAME.xml, \fB\-\-manifest\-name\fR=\fI\,NAME\/\fR.xml |
| 65 | temporary manifest to use for this sync |
| 66 | .TP |
| 67 | \fB\-\-clone\-bundle\fR |
| 68 | enable use of \fI\,/clone.bundle\/\fP on HTTP/HTTPS |
| 69 | .TP |
| 70 | \fB\-\-no\-clone\-bundle\fR |
| 71 | disable use of \fI\,/clone.bundle\/\fP on HTTP/HTTPS |
| 72 | .TP |
| 73 | \fB\-u\fR MANIFEST_SERVER_USERNAME, \fB\-\-manifest\-server\-username\fR=\fI\,MANIFEST_SERVER_USERNAME\/\fR |
| 74 | username to authenticate with the manifest server |
| 75 | .TP |
| 76 | \fB\-p\fR MANIFEST_SERVER_PASSWORD, \fB\-\-manifest\-server\-password\fR=\fI\,MANIFEST_SERVER_PASSWORD\/\fR |
| 77 | password to authenticate with the manifest server |
| 78 | .TP |
| 79 | \fB\-\-fetch\-submodules\fR |
| 80 | fetch submodules from server |
| 81 | .TP |
| 82 | \fB\-\-use\-superproject\fR |
Mike Frysinger | e660106 | 2021-11-12 01:41:29 -0500 | [diff] [blame] | 83 | use the manifest superproject to sync projects; |
| 84 | implies \fB\-c\fR |
Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 85 | .TP |
| 86 | \fB\-\-no\-use\-superproject\fR |
| 87 | disable use of manifest superprojects |
| 88 | .TP |
| 89 | \fB\-\-tags\fR |
| 90 | fetch tags |
| 91 | .TP |
| 92 | \fB\-\-no\-tags\fR |
Mike Frysinger | e660106 | 2021-11-12 01:41:29 -0500 | [diff] [blame] | 93 | don't fetch tags (default) |
Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 94 | .TP |
| 95 | \fB\-\-optimized\-fetch\fR |
| 96 | only fetch projects fixed to sha1 if revision does not |
| 97 | exist locally |
| 98 | .TP |
| 99 | \fB\-\-retry\-fetches\fR=\fI\,RETRY_FETCHES\/\fR |
| 100 | number of times to retry fetches on transient errors |
| 101 | .TP |
| 102 | \fB\-\-prune\fR |
| 103 | delete refs that no longer exist on the remote |
Mike Frysinger | e660106 | 2021-11-12 01:41:29 -0500 | [diff] [blame] | 104 | (default) |
| 105 | .TP |
| 106 | \fB\-\-no\-prune\fR |
| 107 | do not delete refs that no longer exist on the remote |
Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 108 | .TP |
| 109 | \fB\-s\fR, \fB\-\-smart\-sync\fR |
| 110 | smart sync using manifest from the latest known good |
| 111 | build |
| 112 | .TP |
| 113 | \fB\-t\fR SMART_TAG, \fB\-\-smart\-tag\fR=\fI\,SMART_TAG\/\fR |
| 114 | smart sync using manifest from a known tag |
| 115 | .SS Logging options: |
| 116 | .TP |
| 117 | \fB\-v\fR, \fB\-\-verbose\fR |
| 118 | show all output |
| 119 | .TP |
| 120 | \fB\-q\fR, \fB\-\-quiet\fR |
| 121 | only show errors |
Mike Frysinger | d47d9ff | 2022-07-10 05:15:19 -0400 | [diff] [blame] | 122 | .SS Multi\-manifest options: |
| 123 | .TP |
| 124 | \fB\-\-outer\-manifest\fR |
| 125 | operate starting at the outermost manifest |
| 126 | .TP |
| 127 | \fB\-\-no\-outer\-manifest\fR |
| 128 | do not operate on outer manifests |
| 129 | .TP |
| 130 | \fB\-\-this\-manifest\-only\fR |
| 131 | only operate on this (sub)manifest |
| 132 | .TP |
| 133 | \fB\-\-no\-this\-manifest\-only\fR, \fB\-\-all\-manifests\fR |
| 134 | operate on this manifest and its submanifests |
Roger Shimizu | 0a1f533 | 2021-06-20 21:41:05 +0900 | [diff] [blame] | 135 | .SS repo Version options: |
| 136 | .TP |
| 137 | \fB\-\-no\-repo\-verify\fR |
| 138 | do not verify repo source code |
| 139 | .PP |
| 140 | Run `repo help sync` to view the detailed manual. |
| 141 | .SH DETAILS |
| 142 | .PP |
| 143 | The 'repo sync' command synchronizes local project directories with the remote |
| 144 | repositories specified in the manifest. If a local project does not yet exist, |
| 145 | it will clone a new local directory from the remote repository and set up |
| 146 | tracking branches as specified in the manifest. If the local project already |
| 147 | exists, 'repo sync' will update the remote branches and rebase any new local |
| 148 | changes on top of the new remote changes. |
| 149 | .PP |
| 150 | \&'repo sync' will synchronize all projects listed at the command line. Projects |
| 151 | can be specified either by name, or by a relative or absolute path to the |
| 152 | project's local directory. If no projects are specified, 'repo sync' will |
| 153 | synchronize all projects listed in the manifest. |
| 154 | .PP |
| 155 | The \fB\-d\fR/\-\-detach option can be used to switch specified projects back to the |
| 156 | manifest revision. This option is especially helpful if the project is currently |
| 157 | on a topic branch, but the manifest revision is temporarily needed. |
| 158 | .PP |
| 159 | The \fB\-s\fR/\-\-smart\-sync option can be used to sync to a known good build as |
| 160 | specified by the manifest\-server element in the current manifest. The |
| 161 | \fB\-t\fR/\-\-smart\-tag option is similar and allows you to specify a custom tag/label. |
| 162 | .PP |
| 163 | The \fB\-u\fR/\-\-manifest\-server\-username and \fB\-p\fR/\-\-manifest\-server\-password options can |
| 164 | be used to specify a username and password to authenticate with the manifest |
| 165 | server when using the \fB\-s\fR or \fB\-t\fR option. |
| 166 | .PP |
| 167 | If \fB\-u\fR and \fB\-p\fR are not specified when using the \fB\-s\fR or \fB\-t\fR option, 'repo sync' will |
| 168 | attempt to read authentication credentials for the manifest server from the |
| 169 | user's .netrc file. |
| 170 | .PP |
| 171 | \&'repo sync' will not use authentication credentials from \fB\-u\fR/\-p or .netrc if the |
| 172 | manifest server specified in the manifest file already includes credentials. |
| 173 | .PP |
| 174 | By default, all projects will be synced. The \fB\-\-fail\-fast\fR option can be used to |
| 175 | halt syncing as soon as possible when the first project fails to sync. |
| 176 | .PP |
| 177 | The \fB\-\-force\-sync\fR option can be used to overwrite existing git directories if |
| 178 | they have previously been linked to a different object directory. WARNING: This |
| 179 | may cause data to be lost since refs may be removed when overwriting. |
| 180 | .PP |
| 181 | The \fB\-\-force\-remove\-dirty\fR option can be used to remove previously used projects |
| 182 | with uncommitted changes. WARNING: This may cause data to be lost since |
| 183 | uncommitted changes may be removed with projects that no longer exist in the |
| 184 | manifest. |
| 185 | .PP |
| 186 | The \fB\-\-no\-clone\-bundle\fR option disables any attempt to use \fI\,$URL/clone.bundle\/\fP to |
| 187 | bootstrap a new Git repository from a resumeable bundle file on a content |
| 188 | delivery network. This may be necessary if there are problems with the local |
| 189 | Python HTTP client or proxy configuration, but the Git binary works. |
| 190 | .PP |
| 191 | The \fB\-\-fetch\-submodules\fR option enables fetching Git submodules of a project from |
| 192 | server. |
| 193 | .PP |
| 194 | The \fB\-c\fR/\-\-current\-branch option can be used to only fetch objects that are on the |
| 195 | branch specified by a project's revision. |
| 196 | .PP |
| 197 | The \fB\-\-optimized\-fetch\fR option can be used to only fetch projects that are fixed |
| 198 | to a sha1 revision if the sha1 revision does not already exist locally. |
| 199 | .PP |
| 200 | The \fB\-\-prune\fR option can be used to remove any refs that no longer exist on the |
| 201 | remote. |
| 202 | .PP |
| 203 | SSH Connections |
| 204 | .PP |
| 205 | If at least one project remote URL uses an SSH connection (ssh://, git+ssh://, |
| 206 | or user@host:path syntax) repo will automatically enable the SSH ControlMaster |
| 207 | option when connecting to that host. This feature permits other projects in the |
| 208 | same 'repo sync' session to reuse the same SSH tunnel, saving connection setup |
| 209 | overheads. |
| 210 | .PP |
| 211 | To disable this behavior on UNIX platforms, set the GIT_SSH environment variable |
| 212 | to 'ssh'. For example: |
| 213 | .IP |
| 214 | export GIT_SSH=ssh |
| 215 | repo sync |
| 216 | .PP |
| 217 | Compatibility |
| 218 | .PP |
| 219 | This feature is automatically disabled on Windows, due to the lack of UNIX |
| 220 | domain socket support. |
| 221 | .PP |
| 222 | This feature is not compatible with url.insteadof rewrites in the user's |
| 223 | ~/.gitconfig. 'repo sync' is currently not able to perform the rewrite early |
| 224 | enough to establish the ControlMaster tunnel. |
| 225 | .PP |
| 226 | If the remote SSH daemon is Gerrit Code Review, version 2.0.10 or later is |
| 227 | required to fix a server side protocol bug. |