A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
A great example of using forks to propose changes is for bug fixes.
- Make a fix.
- Submit a pull request.
On GitHub
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