Skip to content

Latest commit

 

History

History
62 lines (41 loc) · 1.16 KB

fork.md

File metadata and controls

62 lines (41 loc) · 1.16 KB

Forking Repository

A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.

Table of Contents

Forking
Cloning
Synchronize

Forking

A great example of using forks to propose changes is for bug fixes.

  1. Make a fix.
  2. Submit a pull request.

On GitHub

  • Open a project.
  • In the top-right corner of the page, click Fork. alt text

To be able to work on the project, you will need to clone it to your computer.

git clone [url]

Synchronize your fork with the original repository.

  • List your remote repository
git remote -v
origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
  • Add a remote upstream
git remote add upstream [original project url]

Now, you can keep your fork synced with the upstream repository

git fetch upstream
git merge upstream/master