8 Getting a repository from Github (fork &
Clone: the concept of a “clone” just means to copy the entire repository.
Fork: within the context of GitHub, to fork is to copy someone’s GitHub repository and put it in your GitHub account. Under the hood, it is just cloning their repository.
git clone: copies (download) a remote repo onto your local computer.
8.1 Fork a repository (remote -> remote)
Fork this repository that hosts this bookdown you are reading into your GitHub.
- Go to https://github.com/mychan24/git_github_bookdown
- Click the Fork icon near the top right corner
- …It will take a little while to load…
- You should be redirected to a copy of the same repository in YOUR Github account
8.2 Cloning a repository (remote -> local)
Clone YOUR git_github_bookdown repository onto your local computer:
## Cloning into 'git_github_bookdown'... ## remote: Enumerating objects: 245, done. ## remote: Counting objects: 100% (245/245), done. ## remote: Compressing objects: 100% (136/136), done. ## remote: Total 449 (delta 174), reused 173 (delta 109), pack-reused 204 ## Receiving objects: 100% (449/449), 641.16 KiB | 4.16 MiB/s, done. ## Resolving deltas: 100% (291/291), done.
You have cloned someone else’s repository! This is often how collaboration starts through Github.