Create Your First Repository
This guide walks you through the complete lifecycle of a repository in OpenCodeHub.
Step 1: Creation
- Click the + button in the top navbar and select New Repository.
- Owner: Select yourself or an organization.
- Repository Name: Enter
hello-world. - Description: "My first project on OpenCodeHub".
- Visibility: Select Public.
- Initialize: Check Initialize with README.
Click Create Repository. You'll be taken to your new repository's home page.
Step 2: Cloning
To work on your computer, you need to clone the repository.
SSH (Recommended)
Ensure you have added your SSH key in Settings > SSH Keys.
git clone [email protected]:username/hello-world.git
HTTPS
git clone https://your-instance.com/username/hello-world.git
Step 3: Making Changes
Open the folder in your favorite editor (VS Code, etc.).
cd hello-world
Modify README.md:
# Hello World
This is my first change!
Commit the change:
git add README.md
git commit -m "Update README"
Step 4: Pushing
Push your changes back to OpenCodeHub:
git push origin main
(Or use och push if you installed the CLI).
Step 5: Viewing Changes
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.