Create and view repos
Similar to the depot spec, each Git repo stored in the
Helix server is represented by a repo spec. You can create, update, and delete
repo specs by running the p4 repo
command.
All Helix Core customers (both licensed and unlicensed) can create up to 3 repositories. To obtain more licenses, please contact your Perforce Sales representative.
As of the 2021.1 release (patch 1 or greater), all licensed customers of Helix Core can create unlimited repositories for no additional charge.
Each repo has an owner (a user or a group). By default, this is the user
who creates the repo. The owner automatically acquires repo-wide
admin
privileges and is responsible for managing access
controls for that repo.
In addition, the repo spec includes the repo name and information on when the repo was created as well as the time and date of the last push. The spec also lets you specify:
- a description of the remote server
-
a default branch to clone from
If you do not specify a default branch here, the default branch is
refs/heads/master
. If your project uses another name, see Specify a default branch. -
the upstream URL that the repo is mirrored from
The
MirroredFrom
field is updated automatically during mirroring configuration. For details, see the chapter One-way mirroring from Git servers.
It is possible to enable automatic creation of a repo when you use the
git push
command to push a new repo into the
Helix server. You configure this behavior with the p4
grant-permission
command. For details, see
Manage access to graph depots and repos
and p4 grant-permission in
Helix Core P4 Command Reference.
You can view a list of the Git repos on your server by runnning the
p4 repos
command. Similarly, Git users can run the
following command to view a list of repos:
$ git clone git@ConnectorHost:@list
-
To create a new Git repo in an existing graph depot, run the following command:
$ p4 repo //graphDepotName/repoName
- Edit the resulting spec as needed.
For more information, see p4 repo in Helix Core P4 Command Reference.
Also in this section: