1REPO(1)                           Repo Manual                          REPO(1)
2
3
4

NAME

6       repo - repo sync - manual page for repo sync
7

SYNOPSIS

9       repo sync [<project>...]
10

DESCRIPTION

12       Summary
13
14       Update working tree to the latest revision
15

OPTIONS

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)
26
27       --jobs-checkout=JOBS
28              number of local checkout jobs to run in  parallel  (defaults  to
29              --jobs)
30
31       -f, --force-broken
32              obsolete option (to be deleted in the future)
33
34       --fail-fast
35              stop syncing after first error is hit
36
37       --force-sync
38              overwrite  an  existing  git directory if it needs to point to a
39              different object directory. WARNING: this may cause loss of data
40
41       --force-remove-dirty
42              force remove projects with uncommitted modifications if projects
43              no longer exist in the manifest. WARNING: this may cause loss of
44              data
45
46       -l, --local-only
47              only update working tree, don't fetch
48
49       --no-manifest-update, --nmu
50              use the existing manifest checkout as-is. (do not update to  the
51              latest revision)
52
53       -n, --network-only
54              fetch only, don't update working tree
55
56       -d, --detach
57              detach projects back to manifest revision
58
59       -c, --current-branch
60              fetch only current branch from server
61
62       --no-current-branch
63              fetch all branches from server
64
65       -m NAME.xml, --manifest-name=NAME.xml
66              temporary manifest to use for this sync
67
68       --clone-bundle
69              enable use of /clone.bundle on HTTP/HTTPS
70
71       --no-clone-bundle
72              disable use of /clone.bundle on HTTP/HTTPS
73
74       -u      MANIFEST_SERVER_USERNAME,      --manifest-server-username=MANI‐
75       FEST_SERVER_USERNAME
76              username to authenticate with the manifest server
77
78       -p      MANIFEST_SERVER_PASSWORD,      --manifest-server-password=MANI‐
79       FEST_SERVER_PASSWORD
80              password to authenticate with the manifest server
81
82       --fetch-submodules
83              fetch submodules from server
84
85       --use-superproject
86              use the manifest superproject to sync projects; implies -c
87
88       --no-use-superproject
89              disable use of manifest superprojects
90
91       --tags fetch tags
92
93       --no-tags
94              don't fetch tags (default)
95
96       --optimized-fetch
97              only fetch projects fixed to sha1 if revision does not exist lo‐
98              cally
99
100       --retry-fetches=RETRY_FETCHES
101              number of times to retry fetches on transient errors
102
103       --prune
104              delete refs that no longer exist on the remote (default)
105
106       --no-prune
107              do not delete refs that no longer exist on the remote
108
109       -s, --smart-sync
110              smart sync using manifest from the latest known good build
111
112       -t SMART_TAG, --smart-tag=SMART_TAG
113              smart sync using manifest from a known tag
114
115   Logging options:
116       -v, --verbose
117              show all output
118
119       -q, --quiet
120              only show errors
121
122   repo Version options:
123       --no-repo-verify
124              do not verify repo source code
125
126       Run `repo help sync` to view the detailed manual.
127

DETAILS

129       The 'repo sync' command synchronizes local project directories with the
130       remote  repositories specified in the manifest. If a local project does
131       not yet exist, it will clone a new  local  directory  from  the  remote
132       repository  and  set up tracking branches as specified in the manifest.
133       If the local project already exists, 'repo sync' will update the remote
134       branches  and  rebase  any  new  local changes on top of the new remote
135       changes.
136
137       'repo sync' will synchronize all projects listed at the  command  line.
138       Projects  can be specified either by name, or by a relative or absolute
139       path to the project's local directory. If no  projects  are  specified,
140       'repo sync' will synchronize all projects listed in the manifest.
141
142       The -d/--detach option can be used to switch specified projects back to
143       the manifest revision. This option is especially helpful if the project
144       is  currently on a topic branch, but the manifest revision is temporar‐
145       ily needed.
146
147       The -s/--smart-sync option can be used to sync to a known good build as
148       specified  by  the manifest-server element in the current manifest. The
149       -t/--smart-tag option is similar and allows you  to  specify  a  custom
150       tag/label.
151
152       The -u/--manifest-server-username and -p/--manifest-server-password op‐
153       tions can be used to specify a username and  password  to  authenticate
154       with the manifest server when using the -s or -t option.
155
156       If  -u  and  -p are not specified when using the -s or -t option, 'repo
157       sync' will attempt to read authentication credentials for the  manifest
158       server from the user's .netrc file.
159
160       'repo  sync'  will  not  use  authentication  credentials from -u/-p or
161       .netrc if the manifest server specified in the  manifest  file  already
162       includes credentials.
163
164       By  default, all projects will be synced. The --fail-fast option can be
165       used to halt syncing as soon as possible when the first  project  fails
166       to sync.
167
168       The  --force-sync option can be used to overwrite existing git directo‐
169       ries if they have previously been linked to a different  object  direc‐
170       tory. WARNING: This may cause data to be lost since refs may be removed
171       when overwriting.
172
173       The --force-remove-dirty option can be used to remove  previously  used
174       projects  with  uncommitted changes. WARNING: This may cause data to be
175       lost since uncommitted changes may be removed  with  projects  that  no
176       longer exist in the manifest.
177
178       The    --no-clone-bundle   option   disables   any   attempt   to   use
179       $URL/clone.bundle to bootstrap a new Git repository from  a  resumeable
180       bundle  file  on  a  content delivery network. This may be necessary if
181       there are problems with the local Python HTTP client or proxy  configu‐
182       ration, but the Git binary works.
183
184       The  --fetch-submodules  option  enables  fetching  Git submodules of a
185       project from server.
186
187       The -c/--current-branch option can be used to only fetch  objects  that
188       are on the branch specified by a project's revision.
189
190       The  --optimized-fetch  option  can be used to only fetch projects that
191       are fixed to a sha1 revision if the sha1 revision does not already  ex‐
192       ist locally.
193
194       The  --prune option can be used to remove any refs that no longer exist
195       on the remote.
196
197       SSH Connections
198
199       If at least one project remote URL  uses  an  SSH  connection  (ssh://,
200       git+ssh://,  or  user@host:path  syntax) repo will automatically enable
201       the SSH ControlMaster option when connecting to that host. This feature
202       permits  other  projects  in  the same 'repo sync' session to reuse the
203       same SSH tunnel, saving connection setup overheads.
204
205       To disable this behavior on UNIX platforms, set the GIT_SSH environment
206       variable to 'ssh'. For example:
207
208              export GIT_SSH=ssh repo sync
209
210       Compatibility
211
212       This  feature  is automatically disabled on Windows, due to the lack of
213       UNIX domain socket support.
214
215       This feature is not  compatible  with  url.insteadof  rewrites  in  the
216       user's  ~/.gitconfig.  'repo sync' is currently not able to perform the
217       rewrite early enough to establish the ControlMaster tunnel.
218
219       If the remote SSH daemon is Gerrit Code Review, version 2.0.10 or later
220       is required to fix a server side protocol bug.
221
222
223
224repo sync                        November 2021                         REPO(1)
Impressum