Create a Repository
To create a repository
Navigate to the project in which you want to create a repository.
On the project sidebar, choose Repositories.
On the repositories page, click New repository:
From the dialog window, choose one of the following tabs:
Choose this option if you want to create a new repository and start from scratch or push some source code to it that you have locally.
Choose this option to import a repository from another Git hosting service.
Choose this option if you want to create a synchronized mirror of an existing remote repository from another Git hosting. Note that mirroring works both ways, which means commits will be pushed to the remote repository when pushed to the mirror.
Choose this option if you want to create a synchronized mirror of an existing repository hosted on GitHub with the full support for pull request sync and webhooks.
Fill out the form (follow the instruction below that corresponds to the option you have selected). When you're done filling out the form, click Create.
Space Repository

Repository name
Give your new repository a name and optional description. The name can match or resemble the project name, however two repositories in the same project should not have the same name.
Initialize repository
Check this option if you have no existing code and are staring from scratch. Space will make an initial commit and create system file templates (.gitignore, README.md).
Uncheck this option if you are going to push existing code from a local source and want your repository empty.
Enable default push restrictions
When enabled, the following restrictions will be applied:
Authenticate committer
Maximum file size is 256 kb
Forbidden files: id_rsa
You can disable or change these restrictions after creating the repository on the Repository Settings page.
Default branch name
Name your default branch (e.g. main, master, base)
Migration

Repository name
Give your new Space repository a name and optional description. The name can match or resemble the project name, however two repositories in the same project should not have the same name.
Remote repository URL
Enter the URL of the external repository you want to import to Space.
Authentication
Enter the credentials required to access the external repository. Depending on your external repository access policy, you may need to provide either an SSH key or your username/password. Choose Anonymous if no credentials are required to access your external repository.
The credentials you provide will be used only once and will not be stored in Space.
External Mirror

Repository name
Give your Space mirror repository a distinctive name and optional description. The name should not necessarily match your remote source repository name.
Remote repository URL
Enter the URL of the target remote repository (hosted outside of Space).
Specify synchronization settings
Choose updating options for your mirror:
Check remote repository periodically — the mirror will be synced with the remote repository and updated approximately once an hour. Actual update frequency may vary as it depends on server load.
Check remote repository on fetch — the mirror will be synced with the remote repository every time someone runs the
git fetch
command.
Both options can be selected.
Git refspec
using refspec mapping, specify the branches that should be mirrored and synced. Leave the field blank to sync all branches.
Authentication
Enter the credentials required to access the remote repository. Depending on remote repository access rules, you may need to provide either an SSH key or your username/password. Choose Anonymous if no credentials are required.
The credentials will be stored in Space and used to synchronize the repository.
For more information about mirroring, see Mirror a Repository
GitHub Mirror

Repository name
Give your Space mirror repository a distinctive name and optional description. The name should not necessarily match your GitHub repository name.
GitHub repository name
Provide your GitHub repository name in the format:
owner/repository
.Specify synchronization settings:
Check remote repository periodically — the mirror will be synced with the remote repository and updated approximately once an hour. Actual update frequency may vary as it depends on server load.
Check remote repository on fetch — the mirror will be synced with the remote repository every time someone runs the
git fetch
command.
Both options can be selected.
Git refspec
using refspec mapping, specify the branches that should be mirrored and synced. Leave the field blank to sync all branches.
Authentication
Enter the credentials required to access the remote GitHub repository. Depending on your GitHub repository access rules, You can provide either your GitHub token or your username/password.
The credentials will be stored in Space and used to synchronize the repositories.
For more information about mirroring, see Mirror a Repository
After you created a repository, you can:
Set up or edit Set Up Push Restrictions, Set Up Branch and Merge Restrictions, Repository Webhooks.
Clone the repository to your local machine and start committing to it.