Basic tsrc usage¶
Cloning a set of repositories¶
tsrc is driven by a manifest file that contains the names and paths of repositories to clone.
It uses the YAML syntax and looks like:
repos: - src: foo url: email@example.com:acme/foo - src: bar url: firstname.lastname@example.org:acme/bar
The full manifest file format is described in the reference.
The manifest must be put in a git repository too. You can then use the following commands to create a new workspace:
$ mkdir ~/work $ cd work $ tsrc init email@example.com:acme/manifest.git
In this example:
- A clone of the manifest repository will be created in a hidden
foowill be cloned in
barwill be cloned in
Making sure all the repositories are up to date¶
You can update all the repositories by using
- The manifest itself will be updated first.
- If a new repository has been added to the manifest, it will be cloned.
- Lastly, the other repositories will be updated.
tsrc sync only updates the repositories if the changes are trivial:
- If the branch has diverged,
tsrcwill do nothing. It's up to you to use
- Ditto if there is no remote tracking branch
git, tsrc will walk up the folders hierarchy looking for a
folder, which means you can run tsrc commands anywhere in your workspace, not
just at the top.