blob: 63f41409776e1f6e1eddc14f345f5d3ebb0e33c7 [file] [log] [blame]
Roger Shimizu0a1f5332021-06-20 21:41:05 +09001.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
Mike Frysingere6601062021-11-12 01:41:29 -05002.TH REPO "1" "November 2021" "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
122.SS repo Version options:
123.TP
124\fB\-\-no\-repo\-verify\fR
125do not verify repo source code
126.PP
127Run `repo help sync` to view the detailed manual.
128.SH DETAILS
129.PP
130The 'repo sync' command synchronizes local project directories with the remote
131repositories specified in the manifest. If a local project does not yet exist,
132it will clone a new local directory from the remote repository and set up
133tracking branches as specified in the manifest. If the local project already
134exists, 'repo sync' will update the remote branches and rebase any new local
135changes on top of the new remote changes.
136.PP
137\&'repo sync' will synchronize all projects listed at the command line. Projects
138can be specified either by name, or by a relative or absolute path to the
139project's local directory. If no projects are specified, 'repo sync' will
140synchronize all projects listed in the manifest.
141.PP
142The \fB\-d\fR/\-\-detach option can be used to switch specified projects back to the
143manifest revision. This option is especially helpful if the project is currently
144on a topic branch, but the manifest revision is temporarily needed.
145.PP
146The \fB\-s\fR/\-\-smart\-sync option can be used to sync to a known good build as
147specified by the manifest\-server element in the current manifest. The
148\fB\-t\fR/\-\-smart\-tag option is similar and allows you to specify a custom tag/label.
149.PP
150The \fB\-u\fR/\-\-manifest\-server\-username and \fB\-p\fR/\-\-manifest\-server\-password options can
151be used to specify a username and password to authenticate with the manifest
152server when using the \fB\-s\fR or \fB\-t\fR option.
153.PP
154If \fB\-u\fR and \fB\-p\fR are not specified when using the \fB\-s\fR or \fB\-t\fR option, 'repo sync' will
155attempt to read authentication credentials for the manifest server from the
156user's .netrc file.
157.PP
158\&'repo sync' will not use authentication credentials from \fB\-u\fR/\-p or .netrc if the
159manifest server specified in the manifest file already includes credentials.
160.PP
161By default, all projects will be synced. The \fB\-\-fail\-fast\fR option can be used to
162halt syncing as soon as possible when the first project fails to sync.
163.PP
164The \fB\-\-force\-sync\fR option can be used to overwrite existing git directories if
165they have previously been linked to a different object directory. WARNING: This
166may cause data to be lost since refs may be removed when overwriting.
167.PP
168The \fB\-\-force\-remove\-dirty\fR option can be used to remove previously used projects
169with uncommitted changes. WARNING: This may cause data to be lost since
170uncommitted changes may be removed with projects that no longer exist in the
171manifest.
172.PP
173The \fB\-\-no\-clone\-bundle\fR option disables any attempt to use \fI\,$URL/clone.bundle\/\fP to
174bootstrap a new Git repository from a resumeable bundle file on a content
175delivery network. This may be necessary if there are problems with the local
176Python HTTP client or proxy configuration, but the Git binary works.
177.PP
178The \fB\-\-fetch\-submodules\fR option enables fetching Git submodules of a project from
179server.
180.PP
181The \fB\-c\fR/\-\-current\-branch option can be used to only fetch objects that are on the
182branch specified by a project's revision.
183.PP
184The \fB\-\-optimized\-fetch\fR option can be used to only fetch projects that are fixed
185to a sha1 revision if the sha1 revision does not already exist locally.
186.PP
187The \fB\-\-prune\fR option can be used to remove any refs that no longer exist on the
188remote.
189.PP
190SSH Connections
191.PP
192If at least one project remote URL uses an SSH connection (ssh://, git+ssh://,
193or user@host:path syntax) repo will automatically enable the SSH ControlMaster
194option when connecting to that host. This feature permits other projects in the
195same 'repo sync' session to reuse the same SSH tunnel, saving connection setup
196overheads.
197.PP
198To disable this behavior on UNIX platforms, set the GIT_SSH environment variable
199to 'ssh'. For example:
200.IP
201export GIT_SSH=ssh
202repo sync
203.PP
204Compatibility
205.PP
206This feature is automatically disabled on Windows, due to the lack of UNIX
207domain socket support.
208.PP
209This feature is not compatible with url.insteadof rewrites in the user's
210~/.gitconfig. 'repo sync' is currently not able to perform the rewrite early
211enough to establish the ControlMaster tunnel.
212.PP
213If the remote SSH daemon is Gerrit Code Review, version 2.0.10 or later is
214required to fix a server side protocol bug.