add
Description
Add a Cauldron repository to the local collection of Cauldron repositories
Syntax
ern cauldron repo add <alias> <url>
Arguments
<alias>
Alias to associate to the cauldron repository.
<url>
Local or remote url to the Cauldron git repository to add.
A remote url can be the HTTPS or SSH url to the Cauldron git repository (SSH recommended).
A local url can be any valid path to a local directory (empty directory or containing a git repository).
For HTTPS urls, the username and password (or token) must be specified in the URL (valid formats are
https://[username]:[password]@[repourlorhttps://[token]@[repourl]).By default, the
masterbranch of the repository will be used. If you need to use a different branch, you can set the branch name you want to use, by appending it at the end of the url using the#[branch-name]format (second example below illustrate this).
Options
--current true|falseSet the repository as the active repository after adding it to the collection of repositories.
If this option is not provided, you are prompted to choose if you want to set the repository as the active repository.
--force/-f true|falseOverwrite an existing alias with the same name
Example
ern cauldron repo add my-cauldron [email protected]:username/my-cauldron.git
Add a new Cauldron repository, with alias my-cauldron, and url [email protected]:username/my-cauldron.git, to the local collection of Cauldron repositories. The branch that will be used for this Cauldron will be master as no branch was explicitly specified.
ern cauldron repo add my-local-cauldron ~/path/to/local/cauldron
Add a new Cauldron repository with alias my-local-cauldron and url pointing to local directory ~/path/to/local/cauldron to the location collection of Cauldron repositories.
ern cauldron repo add my-other-cauldron [email protected]:username/other-cauldron#development --current
Add a new Cauldron repository, with alias my-other-cauldron, and url [email protected]:username/other-cauldron, to the local collection of Cauldron repositories and set it at the current activated Cauldron. The branch that will be used for this Cauldron will be development as it was explicitly specified in the Cauldron url.
ern cauldron repo add -f my-local-cauldron ~/path/to/local/cauldron Adds the my-local-cauldron alias, and overwrites it if it already exists.
Remarks
If the
aliasalready exists, this command will fail, unless--force/-fis used.
Last updated