O'Reilly logo
live online training icon Live Online training

Git Basics

Daniel Chen

Git can be used for more than tracking code and data science projects. For example, if you're a student, you can have a place to store your class notes and materials. Let's start over and learn Git from the beginning so you can be less afraid, and see how it can integrate into your life.

What you'll learn-and how you can apply it

  • Using basic git commands
  • Moving around history
  • Understanding remotes
  • Dealing with conflicts

This training course is for you because...

  • You want to incorporate version control methods into your workflow

Prerequisites

Course Set-up

  • Please follow the Carpentries instructions for installing Git (bash): https://carpentries.github.io/workshop-template/#git. It is especially important for Windows users to check off using “nano” as the default text editor. The default editor will be set to Vim, and It’ll be very difficult to explain how to save and quit over a virtual classroom.
  • We will be using GitHub as a remote, so please create a GitHub account beforehand. (You may use any other Git hosting service (e.g., Bitbucket, GitLab, etc) but the class will be using GitHub.)

Recommended Preparation

Recommended Follow-up

About your instructor

  • Daniel Chen, trainer and data scientist, is a graduate student in the interdisciplinary Ph.D. program in genetics, bioinformatics & computational biology (GBCB) at Virginia Polytechnic Institute and State University (Virginia Tech). He is involved with Software Carpentry and Data Carpentry as an instructor and lesson maintainer. He completed his master’s degree in public health at Columbia University Mailman School of Public Health in epidemiology with a certificate in advanced epidemiology and is currently extending his master’s thesis work on attitude diffusion in social networks in the Social and Decision Analytics Laboratory under the Biocomplexity Institute of Virginia Tech.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Segment 1. Basic setup (10 min)

Segment 2. Create a repository (20 min)

Segment 3. Track changes (20 min)

Break (10 min)

Segment 4. Explore history (20 min)

Segment 5. Revert changes (20 min)

Segment 6. Ignore files (20 min)

Break (10 min)

Segment 7. Remotes (25 min)

Segment 8. Conflicts (20 min)

Course wrap-up and next steps (5 min)