Happy Git with R

Happy Git with R
Author

DRB

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.

Denise’s Answer:

The Chapter on Daily Workflows talked about the following:

  • Setting up your repository - making sure to setup a .gitignore file to keep Git from tracking files that don’t need to be.

  • Creating branches and switching between them - use Git to make branches and switch between them.

  • Committing changes - how to stage and commit changes with Git.

  • Pulling and pushing changes - how to use Git to pull changes from a remote repository and push changes made locally to a remote repository.

  • Resolving merge conflicts - how to solve merge conflicts that can happen when working on a project with other people.

The chapter ends with ways on how to stay organized and productive when using Git and GitHub for daily workflows by working to use descriptive branch names, review pull requests regularly, and set up notifications for important events in the repository.

  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?

Denise’s Answer:

The biggest mishap that I’ve been involved in was in many different workplaces that had no repo for code sharing. The most relevant example of lack of repo for code sharing when working with the Nebraska MAP Academy. It would have been nice to have code from the previous student that worked on the project before. Once, I moved on, it was hard to send the code to someone that hasn’t used R before. The biggest issue was sharing a folder on One Drive.

Git would have been much easier to have people see the work that I’ve done and replicate the work for themselves, once I moved on. Now that Git has actions and markdown formats, I believe it would be much easier to have a seamless workflow.

  1. Give an example of one new git feature that you learned about from Jenny Bryan’s book.

Denise’s Answer:

The new git feature that I learned was from the chapter of “Daily Workflow.” What I would like to do a better job with my Git work is to first stop using the desktop version to make sure that I understand the git workflow, while I’ve used the terminal for a few years, I still use the Desktop version to make sure that the correct documents were pushed. When working alone, I don’t use a separate branch from master, this can be a bit problematic in the long-term.