Session 8: Summary & Outlook

Track, organize and share your work: An introduction to Git for research

Course at Max Planck Institute for Human Development

Slides | Source

License: CC BY 4.0 DOI

16:00

1 Summary

How are you now?

Schedule

No Time Title Contents Reading Survey/Quiz
01 09:30 - 10:00 Welcome & Introduction to Version Control Logistics and course admin
Results of course survey
Introduction to version control
Introduction to Git
Introduction to Version Control Course survey
02 10:00 - 11:00 Basics of the Command Line File systems and navigation
Benefits of the command line
Basic command line commands
Command Line Command Line
03 11:00 - 11:15 Setup & configuration of Git Setup & configuration of Git Setup, Installation (if needed) Git Installation
04 11:15 - 12:00 Basics of Git Initializing a Git repository
Fundamental Git commands
Tracking changes wih Git
Practicing basic Git commands
Ignoring files with .gitignore
Good commit messages
First steps with Git, Git Essentials Git Basics Quiz
05 12:00 - 13:00 Branches, Merging, Merge Conflicts Understanding branches in Git
Creating and switching between branches
Merging branches
Resolving merge conflicts
Branches Git Branches Quiz
Lunch 13:00 - 14:00 Lunch Break Enjoy your lunch!
06 14:00 - 15:00 Integration with GitHub / GitLab Introduction to remote repositories
Managing repositories on GitHub / GitLab
Pushing and pulling changes
Cloning a remote repository
Remotes Intro GitHub Quiz
07 15:00 - 16:00 Collaboration on GitHub / GitLab Forking
Collaboration with GitHub Flow
Pull / Merge Requests
Issues
Project Management
GitHub Advanced, GitHub Issues GitHub Quiz
08 16:00 - 16:30 Summary & Outlook Summary of course contents
Outlook to more Git topics
Discussing open questions

Learning Objectives

Introduction to Version Control

💡 You know what version control is.
💡 You can argue why version control is useful (for research).
💡 You can name benefits of Git compared to other approaches to version control.
💡 You can explain the difference between Git and GitHub.

Basics of the Command Line

💡 You can name the advantages of command-line interfaces for Git.
💡 You can navigate directories using absolute and relative paths.
💡 You can use shortcuts like the tilde or dots to navigate your file system.
💡 You can apply arguments and flags to customize command-line commands.
💡 You can use wildcards (*) for file selection.
💡 You can combine command-line commands.

Setup, First steps with Git

💡 You know how to set up Git for the first time
💡 You have set up Git on your computer
💡 You understand the difference between the three Git configuration levels
💡 You know how to configure your username and email address in Git
💡 You have set up your preferred text editor when working with Git
💡 You can escape the command-line text editor Vim

💡 You can initialize a Git repository.
💡 You can check the status of a Git repository.
💡 You understand the difference between the staging area and a commit.
💡 You can stage and commit changes.
💡 You understand the difference between a commit message and a description.

Learning Objectives (continued)

Git Essentials

💡 You know how to explore the commit history.
💡 You can compare different commits.
💡 You know how to use and create a .gitignore file.
💡 You can discuss which files can (not) be tracked well with Git and why.
💡 You know how to track empty folders in Git repositories.

Branches

💡 You understand the purpose and benefits of using branches in Git.
💡 You can create and switch between branches.
💡 You can merge branches and resolve merge conflicts.
💡 You can name at least three best practices when working with branches.

Integration with GitHub / GitLab

💡 You can create a remote repository.
💡 You can connect your local Git repository to a remote repository service like GitHub or GitLab.
💡 You can pull and push changes to and from a remote repository.
💡 You can clone a repository from a remote repository.

Collaboration on GitHub / GitLab

💡 You know the purpose and components of a Pull Request.
💡 You know how to collaborate using the popular workflow strategy GitHub flow.
💡 You know the purpose and components of a README file.
💡 You can fork a repository.
💡 You can create a Pull Request from a forked repository.
💡 You can protect your main branch.

Quizzes

Test your Git knowledge with quizzes (also after the course):

Feel free to enter your personal and course codeword!

2 There’s more …

Rewriting history

See chapter “Rewriting History”

Credit: tech_kody via TikTok

Tags, releases, DOIs: Integration with Zenodo

Zenodo, a CERN service, is an open dependable home for the long-tail of science, enabling researchers to share and preserve any research outputs in any size, any format and from any science.” – from the Zenodo GitHub README

Integrate your repository on GitHub with Zenodo

To make your repositories easier to reference in academic literature, you can create persistent identifiers, also known as Digital Object Identifiers (DOIs). You can use the data archiving tool Zenodo to archive a repository on GitHub.com and issue a DOI for the archive.” – Details in the GitHub documentation

  1. Navigate to the login page for Zenodo.
  2. Click Log in with GitHub.
  3. Review the information about access permissions, then click Authorize zenodo.
  4. Navigate to the Zenodo GitHub page.
  5. To the right of the name of the repository you want to archive, toggle the button to On.

See our book chapter on “Tags & Releases”.

Graphical User Interfaces (GUIs) for Git

Integrated Development Environments (IDEs)

RStudio

MATLAB

Git Clients

GitKraken

GitHub Desktop

Mobile

Working Copy (iOS)

Continuous Integration & Deployment (CI/CD)

from Suresoft

Example: Lennart’s recipes repo

  • Automated spell check
  • Rebuilding of project website

https://lennartwittkuhn.com/recipes/

Version Control for data: DataLad

… for data (binary files) © Jorge Cham (phdcomics.com)

Sadly, Git does not handle large files well.

datalad.org (from the DataLad Handbook by Wagner et al.)

3 Feedback

Feedback

4 Questions?