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