Git

Cloning Repositories

Prerequisites

  • Install the Corigin CLI.
  • Authenticate with corigin login.

Clone a repository

Corigin repositories use a special corigin:// URL scheme. As long as you have the corigin CLI installed, you can clone a repository using git. Corigin clones repositories extremely fast.

Copy the repository ID from the dashboard.

git clone corigin://$REPOSITORY_ID

Shallow clone a repository

If you want to clone a repository without its full history, you can use the --depth option to create a shallow clone. This is useful if you only need the latest version of the repository. For example, in a sandbox running CI/CD piplines.

git clone --depth 1 corigin://$REPOSITORY_ID

Clone a specific branch

If you want to clone a specific branch of a repository, you can use the -b option followed by the branch name. This is useful if you only need to work with a specific branch of the repository.

git clone -b $BRANCH_NAME corigin://$REPOSITORY_ID