Skip to content

Create Your First Repository

This guide walks you through the complete lifecycle of a repository in OpenCodeHub.

  1. Click the + button in the top navbar and select New Repository.
  2. Owner: Select yourself or an organization.
  3. Repository Name: Enter hello-world.
  4. Description: “My first project on OpenCodeHub”.
  5. Visibility: Select Public.
  6. Initialize: Check Initialize with README.

Click Create Repository. You’ll be taken to your new repository’s home page.

To work on your computer, you need to clone the repository.

Ensure you have added your SSH key in Settings > SSH Keys.

Terminal window
git clone git@your-instance.com:username/hello-world.git
Terminal window
git clone https://your-instance.com/username/hello-world.git

Open the folder in your favorite editor (VS Code, etc.).

Terminal window
cd hello-world

Modify README.md:

# Hello World
This is my first change!

Commit the change:

Terminal window
git add README.md
git commit -m "Update README"

Push your changes back to OpenCodeHub:

Terminal window
git push origin main

(Or use och push if you installed the CLI).

Refresh your repository page in the browser. You should see your updated README.md displayed and the latest commit listed.

Congratulations! You’ve successfully hosted code on OpenCodeHub.