Introduction to git and GitHub, for a fool-proof programming

Welcome to the course “Introduction to git and GitHub, for a fool-proof programming”! The goal of the course is to basic understanding of git, how to use it with GitHub, and in interaction with your scientific workflow.

Course Information

Time and Location

The workshop will be in-person, starting at 9:30 pm on Thursday 24th in the Beehive Room (ground floor of iDiv main building). The course will end the same day at 5:00 pm.

Pre-workshop Survey

Please fill the pre-workshop survey (4 questions, 5 min), this would help us know better what is your previous knowledge and let you choose between additional topics that you would like to be covered.

Material needed

To follow the workshop you’ll need a computer with git installed (see above). We will also use RStudio git pane, so please install RStudio. Finally you will need a GitHub account, if you don’t have one, please create one.

Story setting

Wolfman and Dracula have been hired by Universal Missions (a space services spinoff from Euphoric State University) to investigate if it is possible to send their next planetary lander to Mars. They want to be able to work on the plans at the same time, but they have run into problems doing this in the past. If they take turns, each one will spend a lot of time waiting for the other to finish, but if they work on their own copies and email changes back and forth things will be lost, overwritten, or duplicated.

A colleague suggests using version control to manage their work. Version control is better than mailing files back and forth:

Teams are not the only ones to benefit from version control: lone researchers can benefit immensely. Keeping a record of what was changed, when, and why is extremely useful for all researchers if they ever need to come back to the project later on (e.g., a year later, when memory has faded).

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.

Prerequisites

In this lesson we use Git from the Unix Shell. Some previous experience with the shell is expected, but isn’t mandatory.

Schedule

Setup Download files required for the lesson
09:30 1. General Introduction How is this course going to work?
09:45 2. Beginning with the Terminal How do I navigate in command line?
10:00 3. Basics What is version control?
10:10 4. Setting Up Git How do I get set up to use Git?
10:15 5. Creating a Repository Where does Git store information?
10:25 6. Tracking Changes How do I record changes in Git?
How do I check the status of my version control repository?
How do I record notes about what changes I made and why?
10:45 7. Coffee Break Break
11:00 8. Exploring History How can I identify old versions of files?
How do I review my changes?
How can I recover old versions of files?
11:25 9. Ignoring Things How can I tell Git to ignore files I don’t want to track?
11:30 10. Remotes in GitHub How do I share my changes with others on the web?
12:15 11. Lunch Break Break
13:15 12. Collaborating How can I use version control to collaborate with other people?
13:40 13. Conflicts What do I do when my changes conflict with someone else’s?
13:55 14. Open Science How can version control help me make my work more open?
14:05 15. Citation How can I make my work easier to cite?
14:10 16. Hosting Where should I host my version control repositories?
14:20 17. Coffee Break Break
14:35 18. Using Git from RStudio How can I use Git with RStudio?
14:45 19. Using Git with EVE How can I use Git with a High-Performance Computer (EVE)?
15:00 20. Coffee Break Break
15:15 21. Connecting GitHub with Zenodo How can I get a DOI and a permanent archive from code I have on GitHub?
15:35 22. Navigating and Searching code on GitHub How can I use GitHub to navigate my code?
16:00 23. Coffee Break Break
16:15 24. Extra time
17:00 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.