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