Chapter 32 Clone a repo
Clone someone else’s repository on GitHub where you just want a copy. But you also want to track its evolution. That is what differentiates a GitHub clone from, say, simply downloading the ZIP archive at a specific point in time.
Pick a GitHub repository that interests you. Inspiration:
- an R package you care about
- a data analytic project you find interesting
- Example: The GitHub repo that underpins Polygraphing’s blog post analyzing 2,000 screenplays is here: https://github.com/brandles/scripts
- Example: FiveThirtyEight shared the data and code behind their Gun Deaths in America project on GitHub: https://github.com/fivethirtyeight/guns-data. Have a look around their other repos as well.
Create a new RStudio Project from this GitHub repo. Refresh your memory of how to do that by re-visiting our “GitHub first” workflow in chapter 15.
Once you have the code locally, try to run some of it. Try to understand how it works.
Do you want to make a change? Fine do that!
Do you want to send changes back to the original author? Now you have firsthand knowledge of when you should fork instead of clone. See chapter ??.