Session 8: Summary & Outlook

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

Course at General Psychology Lab at the University of Hamburg

Slides | Source

License: CC BY 4.0 DOI

15:00

1 Summary

Schedule

No Time Title Contents Reading Survey/Quiz
1 9: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
2 10:00 - 10:45 Basics of the Command Line File systems and navigation
Benefits of the command line
Basic command line commands
Command Line Command Line Quiz
3 10:45 - 11:30 Setup & First steps with Git Configuration and setup of Git
Initializing a Git repository
Fundamental Git commands
Tracking changes wih Git
Setup, First steps with Git, Git Essentials Git Basics Quiz
4 11:30 - 12:15 Branches, Merging Merge Conflicts Understanding branches in Git
Creating and switching between branches
Merging branches
Resolving merge conflicts
Branches Git Branches Quiz
5 12:30 - 13:30 Lunch Break Enjoy your lunch!
6 13:30 - 14:15 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
7 14:15 - 15:00 Collaboration on GitHub / GitLab Forking
Collaboration with GitHub Flow
Pull / Merge Requests
Issues
Project Management
GitHub Advanced, GitHub Issues GitHub Quiz
8 15:00 - 15:30 Summary & Outlook Summary of course contents
Outlook to more Git topics
Discussing open questions

Learning Objectives

Session 1: 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.

Session 2: Basics of the Command Line

💡 You can navigate directories using the command line.
💡 You can use shortcuts like the tilde or dots to navigate your file system.
💡 You can explain the difference between absolute and relative paths.
💡 You can use arguments and flags to modify command-line commands.
💡 You understand the concept of wild cards (*) and can use it for system navigation.

Session 3: Setup, First steps with Git & Git Essentials

💡 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 stage and commit changes

Learning Objectives (continued)

💡 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

Session 4: 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.

Session 6: Integration with GitHub / GitLab

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

Session 7: Collaboration on GitHub / GitLab

💡 You can fork a repository.
💡 You know the purpose and components of a Pull Request.
💡 You can create a Pull Request from a forked repository.
💡 You know how to collaborate using the popular workflow strategy GitHub flow.
💡 You know the purpose and components of a README file.
💡 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?