Чтобы создать новый репозиторий с помощью интерфейса командной строки (CLI), вы можете использовать несколько методов в зависимости от используемой вами системы контроля версий (VCS). Вот примеры популярных платформ VCS:
-
Git:
# Initialize a new Git repository git init # Create a new remote repository on GitHub # (You need to have the GitHub CLI installed and authenticated) gh repo create <repo_name> -
Ртуть (Hg):
# Initialize a new Mercurial repository hg init <repo_name> -
Подрывная версия (SVN):
# Create a new Subversion repository svnadmin create <repo_name> -
Perforce:
# Create a new Perforce depot p4 depot -t <repo_name> -
Bitbucket:
# Create a new repository on Bitbucket # (You need to have the Bitbucket CLI installed and authenticated) bb repo create <repo_name> -
Azure DevOps:
# Create a new repository on Azure DevOps # (You need to have the Azure CLI installed and authenticated) az repos create --name <repo_name> --project <project_name> -
GitLab:
# Create a new repository on GitLab # (You need to have the GitLab CLI installed and authenticated) gitlab create project <repo_name>