Join a workspace
This page shows how to bring a multi-repository workspace up on a new machine and keep it current.
Before you start
- Install reprobuild.
- git can reach the workspace's repositories. For private repositories, sign in to their host first.
- You know the workspace's organisation or the URL of its workspace root.
Steps
1. Clone the workspace
Clone the workspace into a new directory:
repro workspace init <organisation-or-url> ~/work/my-workspace
cd ~/work/my-workspaceGiven an organisation name, reprobuild clones that organisation's repro-workspace repository and checks out the repositories that the workspace's default projects need, side by side.
repro ws is short for repro workspace.
2. List its projects
See the workspace's projects, and which are checked out here:
repro ws projects list3. Check out another project
Check out another project's repositories:
repro ws enable <project>To remove a project's checkouts again, run repro ws disable <project>. It removes only the checkouts no other enabled project uses, and refuses when one of them carries work that is not pushed.
4. Install the git hooks
Install the git hooks that keep the repositories consistent:
repro hooks ensure --vcs5. Check the result
Check the result:
repro healthKeep every repository current
| To | Run |
|---|---|
| Fetch and fast-forward each repository on its current branch | repro sync |
| See each repository's branch, uncommitted changes and lock drift | repro ws status |
| Run a command in every repository | repro ws forall -c '<command>' |
Check that it worked
repro ws status lists every repository of your enabled projects, and repro health reports no failed check.