Create Your First Repository
About 450 wordsAbout 2 min
An organization is a namespace for managing members and resources. Create an organization before creating repositories. Repositories are used to host code assets and manage Cloud Native Build pipeline configurations.
1. Create an Organization
Click the + in the upper right corner, select Create Organization, fill in the name and description, then click Create.

2. Create a Repository
Click the + in the upper right corner, select Create Repository, choose the parent organization, fill in the repository name, select visibility as needed, then click Create.

3. Initialize the Repository
You can choose any of the following methods to initialize the repository.
3.1 Cloud Quick Initialization (Recommended)
Work directly in the Cloud Native Development environment without local Git setup:
- Migrate existing repository: Paste the old repository URL on the welcome page for one-click migration
- Create new files: Create README and other files directly on the web

3.2 Push Local Project to CNB
If you already have a local project directory and want to push it to CNB:
# 1. Enter your local project directory
cd my-project
# 2. Initialize Git (if not already done)
git init
# 3. Add CNB repository as remote
git remote add origin https://cnb.cool/org/repo-name.git
# 4. Add all files and commit
git add .
git commit -m "Initial commit"
# 5. Push to CNB (use -u for first push)
git push -u origin mainNote
If your local default branch is master instead of main, you can rename it with git branch -M main, or specify the branch name when pushing.
3.3 Migrate from Other Platforms
Full Migration (Preserve All History)
# 1. Clone bare repository
git clone --bare https://github.com/old-repo.git
# 2. Push to CNB (--mirror syncs all branches and tags)
cd old-repo.git
git push --mirror https://cnb.cool/org/new-repo.git
# 3. Clean up temporary files
cd .. && rm -rf old-repo.gitMigrate Specific Branches Only
# 1. Clone source repository
git clone https://github.com/old-repo.git
cd old-repo
# 2. Add CNB as remote
git remote add cnb https://cnb.cool/org/new-repo.git
# 3. Push needed branches
git push cnb main
git push cnb develop
# 4. Push tags
git push cnb --tags3.4 Clone Empty Repository and Commit
# 1. Clone the empty repository from CNB
git clone https://cnb.cool/org/new-repo.git
cd new-repo
# 2. Create files
echo "# My Project" > README.md
# 3. Commit and push
git add README.md
git commit -m "Initial commit"
git push -u origin main