<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/guide-to-tidy-git-analysis/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://drsimonj.svbtle.com/embarking-on-a-tidy-git-analysis"> blogR</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><a rel="nofollow" href="https://twitter.com/drsimonj" target="_blank">@drsimonj</a> here to help you embark on git repo analyses!</p>
<p>Ever wondered who contributes to git repos? How their contributions have changed over time? What sort of conventions different authors use in their commit messages? Maybe you were inspired by <a rel="nofollow" href="https://twitter.com/dataandme" target="_blank">Mara Averick</a> to <a rel="nofollow" href="https://www.rstudio.com/resources/videos/contributing-to-tidyverse-packages/" target="_blank">contribute to tidyverse packages</a> and wonder how you fit in?</p>
<p>This post – intended for intermediate R users – will help you answer these sorts of questions using tidy R tools.</p>
<p>Install and load these packages to follow along:</p>
<pre><code># Parts 1 and 2
library(tidyverse)
library(glue)
library(stringr)
library(forcats)

# Part 3
library(tidygraph)
library(ggraph)
library(tidytext)
</code></pre>
<h1><a rel="nofollow" href="http://drsimonj.svbtle.com/embarking-on-a-tidy-git-analysis#part-1-git-repo-to-a-tidy-data-frame_1" target="_blank"> </a>Part 1: Git repo to a tidy data frame</h1>
<h2><a rel="nofollow" href="http://drsimonj.svbtle.com/embarking-on-a-tidy-git-analysis#get-a-git-repo_2" target="_blank"> </a>Get a git repo</h2>
<p>We’ll explore the open-source <a rel="nofollow" href="https://github.com/tidyverse/ggplot2" target="_blank">ggplot2 repo</a> by copying it to our local machine with <a rel="nofollow" href="https://git-scm.com/docs/git-clone" target="_blank"><code>git clone</code></a>, typically run on a command-line like:</p>
<pre><code>git clone </code></pre>