Skip to content
Discussion options

You must be logged in to vote

The easiest way to understand fork, clone, and branch is to think of them as three different things used at different stages of your workflow.

1. Fork — Your own copy on GitHub

A fork creates a copy of someone else’s repository under your own GitHub account.

For example, suppose you want to contribute to an open-source project:

Original Repository
github.com/project/app
        ↓ fork
Your Repository
github.com/yourname/app

You usually fork a repository when you don’t have permission to directly push changes to the original repository.


2. Clone — Copy the repository to your computer

After forking, you can clone your fork to your local machine.

git clone https://github.com/yourname/app.…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by teamtigersofficial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants