> ## Content Index
> Fetch the complete content index at: https://linuxhandbook.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Fork a GitHub Repository
- URL: https://linuxhandbook.com/github-fork-repository/
- Published: 2024-09-08T11:16:16.000Z
- Updated: 2024-09-08T11:16:16.000Z
- Description: The first step in contributing to an open source project is to fork it. Learn to fork a repo on GitHub in this quick tutorial.
- Author: Prakhar Tiwari
- Tags: GitHub Fundamentals, #docs-col

Forking a repository on GitHub is one of the fundamental concepts in open source contribution on GitHub. 

You can't directly contribute to a repository, so you need to fork it first, make changes to the fork, and then make a PR for those changes to be accepted in the original repo. 

**What does the word Forking mean?**

Just like a *fork in a road* [*(a metaphor)*](https://en.wikipedia.org/wiki/Fork%5Fin%5Fthe%5Froad?ref=linuxhandbook.com) divides a path into different directions, forking a repository creates a divergence in the project's development path.

In GitHub, forking a repo means copying it into your account, which will be owned by you and you can make changes to it. 

## How to Fork a Repository on GitHub

- Open the GitHub repo
- Click on the Fork button at the top

![](https://linuxhandbook.com/content/images/2023/12/forking_repo-1.gif)

GIF showing how to fork a repository

## Is the fork dependent on the source repo? What if the original one gets deleted?

Here are your answers in points:

- If the original private repo is deleted: all of its forks will be deleted.
- If the original public repo is deleted: its forks will not be deleted.
- If the public repo is converted to private, and deleted the original: Forked repo will not be deleted.

## Do the changes in the fork affect the original repo? (and vice versa)

**Your fork of the repository is completely independent of the original repository**, and changes you make to the fork do not affect the original repository unless you use a pull request to merge your changes back into it.

The changes done to the source repo don't happen in the fork *automatically*, one needs to click on the **"Sync fork" button** that appears on the fork repo if there are any changes in the source repo.

![Screenshot of the main page of a fork. A dropdown menu, labeled with a sync icon and "Sync fork," is outlined in dark orange.](https://docs.github.com/assets/cb-75616/images/help/repository/sync-fork-dropdown.png)

### Thanks for reading!

I hope this article helped you, keep learning & keep GitHubing!