-
Notifications
You must be signed in to change notification settings - Fork 281
Command summary test for issue 328
Magnus Karlsson edited this page Jan 4, 2018
·
4 revisions
Clone repo as a subrepo in a sub directory in your repository
| option | description |
|---|---|
| repository | Repository to clone |
| [subdir] | sub directory name, default to directory part of the repository |
| [--branch] | Upstream branch, default to HEAD branch |
| [--force] | Overwrite existing sub directory |
| condition | Description | Action |
|---|---|---|
| START | Nothing | |
| END | subrepo inside sub directory | |
| ERROR | No default HEAD branch | Use --branch or move HEAD to a valid branch in the target repository |
Turn an existing subdirectory into a subrepo.
| option | description | action |
|---|---|---|
| START | Nothing | |
| subdir | target sub directory | |
| [--remote] | Set .gitrepo subrepo.remote | |
| [--branch] | Set .gitrepo subrepo.branch | |
| END | subrepo inside sub directory | |
| ERROR | No sub directory exist | Create and add a subdirectory |
| ERROR | Sub directory is not part of the repo | Add subdirectory to repo with git add |
Update a subrepo sub directory with latest upstream changes.
| option | description | action |
|---|---|---|
| START | clean subrepo | |
| subdir | Target sub directory | |
| [--all] | Target all subrepos | |
| [--branch] | Use this branch instead of subrepo.branch | |
| [--clean] | Clean up previous branches worktree | |
| [--force] | Ignore previous upstream HEAD | |
| [--remote] | Use this remote instead of subrepo.remote | |
| [--squash] | Ignore the subrepo.parent, squash commits in local branch | |
| [--update] | Update .gitrepo subrepo.remote and subrepo.branch from --remote and --branch | |
| END | subrepo synced with upstream | |
| ERROR | worktree already exists | --clean |
| ERROR | Current subrepo HEAD is not part of upstream | --force |
| ERROR | Current parent is not part of branch (rebase) | --squash |