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