We will start out today by installing GitHub and then go on to some exercises.
In this tutorial, I will have you install GitHub Desktop because it is easier to use. Be aware that the GUI (graphical user interface) version has fewer features than the CLI (command line interface) version.
Ensure you have a GitHub username and password
Go to https://desktop.github.com/ and download the installer that’s appropriate for your system.
Run the installer
Have your GitHub username and password ready
Open GitHub Desktop
When asked enter your username and password
You should now be ready to work
Open RStudio
File > New Project > Version Control > Git
Enter the book club url https://github.com/jsrodriguezl/Book_Club
Hit tab and the name should populate automatically
Hit Create Project and wait for the files to download
In the top right pane of the RStudio editor you should now have a git tab, switch to it
Press the Diff button and see what happens
Plot a normal curve and save it as a .png file in the GitHub Session directory
x <- seq(-4, 4, length = 100)
y <- dnorm(x)
png(filename = "./GitHub Session/yourName.png")
plot(x, y, main = "Standard Normal Distrubition")
dev.off()
Now press the Diff button and see what happens
Check the box next to the file you’ve just created
Add a commit message something like “Lucas’ plot”
Press the commit button and then the push button
Close the Diff screen and return to RStudio
In the top right pane and the Git tab hit pull
You should now be able to see the changes others have committed