Happy Git with R

Happy Git with R
Author

Not Charlie

Published

February 2, 2023

Prompt:

git and Github are tools for helping with versioning of files in collaborative efforts as well as archiving entries for your future self. Unfortunately working with git isn’t always completely straightforward. Jenny Bryan’s book “Happy git and github with R” helps with that. The book is available from http://happygitwithr.com/. Have a look over the index and pick one of the chapters for a more in-depth read.

Write a blog post answering the following questions:

  1. Write a short (100-150 words) summary of the chapter you read in-depth.
  • The chapter the I read was “29. Pull, But you have Local Work”, where Bryan talks through how to resolve a common way to have merge conflicts: when you want to push but can’t until you pull but you have changes locally, so you can’t pull with automatic merging. She covers both how to manage pulling with in-progress work both commited and not commited. She also talked about what to do when the easier steps don’t work out; git stash won’t always work, so here’s what to do if it doesn’t. She also touched on rebasing, and on continuing your own work in a temporary branch from main.
  1. Looking back at all of the team projects you have been involved in, describe the biggest mishap you had. Could that have been avoided using git? How?.
  • While working on my Capstone project in undergrad, a group member of mine had his laptop destroyed by a dog knocking a beer over. We lost about 2 weeks of work that day. If we were using git, we (probably) would have lost significantly less work, and I wouldn’t have had to stay up multiple days to work on the code that he had lost. Git would have been good both to help store the code, that way things like that could have been easily avoided and worked around, but also, git pushes and pulls are much easier than emailing R scripts around.
  1. Give an example of one new git feature that you learned about from Jenny Bryan’s book..
  • I am horrified of merge conflicts. I still am horrified of merge conflicts. But now, I am a little less scared, especially knowing that they are common and happen all of the time. Even if I forget the exacts on how to manage merge conflicts, I do also know now where I can go for a relatively clear step-by-step walkthrough of managing pulling when I have work of my own (becuase that is easier than saving all of my work in an external document and then deleting my directory locally and then make a new directory and connect it to the repo and then move my changes back, just so I can pull the most recent work.)