Creating a forked repo

July 13, 2024 ยท View on GitHub

In order to limit the branches on the main repo, Radius enforces code contributions via forked repos.

To create a forked repo, go to the main Radius repo page in GitHub and select the "fork" option:

Creating a fork of the main repo

Clone the forked repo

Now clone the forked repo and navigate there in your command shell.

git clone <forked repo url>

Configuring remote repositories

Configure the remote repositories, referring to the forked repo as origin and the main repo as upstream (you may choose your own custom names if desired).

Adding remote repositories

git remote add origin <url of the forked repo>
git remote add upstream <url of the Radius main repo>

Verify new remote

git remote -v

Workflow to follow

  1. Push your local code changes to the forked repo

    git push origin <local branch>
    
  2. Go to the main Radius repo and create a pull request using the compare against forks option:

    Creating a pull request across forks

    Make sure you select the fields (shown in red) "head repository" as your fork (/radius) and "compare" as your branch with the code changes.