Skip to content

1st time contribution to Rocky Linux Documentation via CLI


This Gemstone details how to contribute to the Rocky Linux documentation project using only the command line interface (CLI). It covers forking the repository the 1st time and creating a pull request. We'll use contributing a new Gemstone document in our example.

Problem Description

Contributors may prefer or need to perform all actions via the CLI, from forking repositories to submitting pull requests for the first time.


  • A GitHub account
  • git and GitHub CLI (gh) installed on your system
  • A markdown file ready for contribution

Solution Steps

  1. Fork the Repository Using GitHub CLI: Fork the upstream repository to your account.
gh repo fork --clone
  1. Navigate to the Repository Directory:
cd documentation
  1. Add the Upstream Repository:
git remote add upstream
  1. Create a New Branch: Create a new branch for your contribution. Type:
git checkout -b new-gemstone
  1. Add Your New Document: Use your favorite text editor to create and edit your new contribution file. For this example, we'll create a new file named and save the file under the docs/gemstones/ directory.

  2. Commit Your Changes: Stage and commit your new file. Type:

git add docs/gemstones/
git commit -m "Add new Gemstone document"
  1. Push to Your Fork: Push the changes to your fork/copy of the Rocky Linux documentation repo. Type:
git push origin new-gemstone
  1. Create a Pull Request: Create a pull request to the upstream repository.
gh pr create --base main --head wsoyinka:new-gemstone --title "New Gemstone: Creating PRs via CLI" --body "Guide on how to contribute to documentation using CLI"

Additional Information (Optional)

  • Use gh pr list and gh pr status to track the status of your pull requests.
  • Review and follow the contribution guidelines of the Rocky Linux documentation project.


Following these steps, you should be able to successfully create your very first PR and contribute to the Rocky Linux documentation repository entirely via the CLI!

Author: Wale Soyinka