Slides

Github Forks and Clones

Git clones and forks are two different things.

Cloning a repository is creating a local copy of it.

To add code to a cloned repo, you create a new branch on the repo, push commits to the branch, and then create a PR for the branch into another branch (usually master).

Forking a respository is creating a duplicate of that repo on github.

To add code to a forked repository, you create a new branch on the fork of the upstream repo. After coding and committing locally, you will first pull changes from upstream down. Once the upstream changes are integrated into your local work, you can push your branch up to the fork. Lastly, a PR is created to merge the branch from the fork into a branch from the original or origin repo.