Skip to content

GitHub Forking

A GitHub fork is a copy of a repository in your account, allowing you to make changes independently of the original repository and propose those changes back through a pull request.


Forking is a key concept in open-source development. It lets you experiment with changes without affecting the original project. You can make changes, commit them, and propose them to the original repository.

Steps to Fork a Repository

1. Find the Repository

Navigate to the GitHub page of the repository you want to fork.

2. Fork the Repository

Click the "Fork" button in the top-right corner. GitHub creates a copy in your account, named username/repository-name.

3. Clone the Forked Repository

Clone the repository to your local machine:

git clone git@github.com:your-username/repository-name.git

Replace your-username and repository-name as appropriate.

4. Make Changes

Modify files locally using your preferred editor.

5. Commit Changes

Stage and commit your changes:

git add .
git commit -m "Describe the changes you made"

6. Push Changes

Push your changes to GitHub:

git push origin master

Replace master with your branch name if different.

7. Create a Pull Request

Go to your forked repository on GitHub, click "Pull request", then "New pull request". Fill out the form and submit.

The owner of the original repository will review your changes and decide whether to merge