dev-ops-challenges

Fork a Git Repository

Technical Overview

In Git-based collaborative workflows, a fork is a server-side copy of a repository that lives under a developer’s personal namespace on a hosting platform (such as Gitea, GitHub, or GitLab).

While cloning copies a repository to a local machine, forking copies the repository directly on the remote server. This is a fundamental concept in open-source and modern DevOps practices:

This guide outlines the steps to navigate the self-hosted Gitea portal, locate the target upstream repository (sarah/story-blog), perform the fork operation under the user jon, and verify the fork.


Infrastructure & Configuration Requirements


Step-by-Step Implementation

Step 1: Access the Gitea Dashboard

Access the self-hosted Gitea service through your web browser and click on Sign In in the top right corner to log in as the developer jon.

Gitea Landing Page


Step 2: Locate the Upstream Repository

Navigate to the original repository hosted by Sarah at /sarah/story-blog. Verify that you are logged in as jon (visible via the profile icon in the top right) and locate the Fork button on the top right header of the repository view.

 Sarah Upstream Repository


Step 3: Configure and Fork the Repository

Click the Fork button. This opens the New Repository Fork page where you configure the destination:

Click Fork Repository to run the server-side copy operation.

Fork Repository Configuration


Step 4: Verify the Forked Repository

Once the forking process completes, Gitea redirects you to your new personal repository page at /jon/story-blog.

Confirm that:

  1. The repository title displays jon / story-blog.
  2. The subtitle shows forked from sarah/story-blog, which acts as a permanent reference back to the original upstream project.
  3. The Settings tab is available, indicating you now have full admin write access to this fork.

Forked Repository Verification


Post-Deployment Verification

With the fork successfully created, you can now clone the repository locally using your personal developer credentials:

git clone http://3000-port-ldpfesnbuc6nu6zk.labs.kodekloud.com/jon/story-blog.git

You can safely commit modifications and push back to your fork at /jon/story-blog.