New GitHub Repo
How to create new project repositories on GitHub
This document describes the process for creating a new repository on GitHub. The instructions are organized by project type and can be extended for other languages and frameworks in the future.
Rust Projects
Environment Setup
Before creating a new Rust repository, ensure your environment is ready.
Install cargo-generate:
cargo install cargo-generateInstall GitHub CLI:
- macOS:
brew install gh - Linux:
Install from your distribution's repository or follow the official instructions.
Set up authentication in GitHub CLI:
gh auth loginand follow the instructions provided by the command.
Repository Creation
WARNING
For now only pure bin or lib projects are supported. If you need to create a project with workspace or both bin+lib configuration, please create it manually.
Generate a new repository from the template:
cargo generate gh:rete-labs/rust-templateThe command will prompt for Project Name and Project Description. These values will be used to fill placeholders in the template.
A new repository will be created in a subdirectory with the provided Project Name. Project Name must follow kebab-case naming conventions (e.g., my-cool-project).
By default, a binary project is created. To create a library project, add --lib:
cargo generate gh:rete-labs/rust-template --libFor more details, see the cargo-generate documentation.
Change into the created repository directory. You will find all files needed for the initial commit. Commit them.
Create the repository on GitHub and push the code:
gh repo create rete-labs/<my-cool-project> --source=. --public --pushFill in <my-cool-project> with the desired repository name.
Visibility
You can specify --public, --internal or --private to control visibility of the new project.