Reference

Top Tips

These are some tips/references to keep in mind when working with git:

  • Review GitHub Guidance
  • Although it’s good to use version control throughout a project, Git can be initialised on an existing project folder.
  • Commit often. Commits are the project history so commit after a section of code is completed, before lunch, at the end of the day, etc.
  • Write good commit messages. The messages should be succinct, meaningful, and written in imperative form (i.e. “Add x, y, z” not “Added x, y, z”).
  • Delete branches after merging. This reduces risks of merge conflicts and keeps your work set-up tidy.
  • It’s possible to have multiple branches for working on or fixing multiple features of your project, but be aware that this increases the chance of a merge conflict.

GitHub should be thought of as a public forum. No confidential information (including server connection details, passwords, and person identifiable information) should be pushed, even to a private repository! Keep this in mind throughout any project, it’s easier to maintain security throughout than have to go back through and delete code or commits later.

Git

Pro Git Book - A complete reference text for Git.

Atlassian - Git - Tutorials, tips, and the latest news about Git.

Try Git - Learn by doing. This will allow you to work with Git commands on a secure tutorial system.

Software Carpentry - Git Lesson - “Version control is the lab notebook of the digital world: it’s what professionals use to keep track of what they’ve done and to collaborate with other people. Every large software development project relies on it, and most programmers use it for their small jobs as well. And it isn’t just for software: books, papers, small data sets, and anything that changes over time or needs to be shared can and should be stored in a version control system.”

Department for Education - VSTS for Analysis - “This book aims act as a resource for analysts on how and why they should use version control.”

GitHub

GitHub Guides - A variety of guides available directly from GitHub.

Udacity - How to Use Git and GitHub - “Effective use of version control is an important and useful skill for any developer working on long-lived (or even medium-lived) projects, especially if more than one developer is involved. This course, built with input from GitHub, will introduce the basics of using version control by focusing on a particular version control system called Git and a collaboration platform called GitHub.”

Happy Git and GitHub for the useR - “Integrate Git and GitHub into your daily work with R and R Markdown.”

RStudio

RStudio - Using Projects - A support article for using RStudio projects. There is a need to use projects for version control so this article provides an introduction to this topic.

RStudio - Version Control with Git and SVN - A support article for using version control in RStudio.

R Package Pull Requests: A Newbie’s Guide - A blog post that discusses the experience of submitting pull requests for existing R packages.