Version Control

Picking the one right tool:
Git & GitHub

John Little

Duke University Libraries

Center for Data & Visualization Sciences

2024-09-27

Version control

 

Documenting the story of a project

 

Among other features, version control enables time travel i.e. interacting with earlier phases of a project

Two-minute video

 

https://duke.is/git

Reproducibility

Reproducibility pyramid
Why

Version control enables reproducibility

What

Reconstruct results, analyses, and figures using the original computation tools

How

Do everything with code

 

 

“You pick the one right tool” – Anton Chigurh

Summary

Llewelyn Moss

Protagonist finds a satchel of cash. There are no people claiming the cash for miles around. Finders Keepers (played by Josh Brolin)

Anton Chigurh

Hired to retrieve the money. Has strong feelings about accomplishing his goals (Javier Bardem)

Carson Wells

Hired to assist Chigurh, unbeknownst to Chigurh (Woody Harrelson)

Ed Tom Bell

Trying to do his best amidst a difficult situation where there is no easy solution (Tommy Lee Jones)

Symbiotic

 

Git and GitHub Chigurh and Wells

 

Each side benefits the other

 

The relationship between Git and GitHub is not as dangerous. Git is a tool for version control, and GitHub is a remote hub (cloud / web) for storing and managing Git repositories. Git and GitHub work together to provide a powerful platform for collaboration.

Nutshell

 

Git is an emotionless, powerhouse application built to exhibit an indefatigable and extensible ability


  • Track files changes over time

  • Time-travel to earlier stages of the entire project

  • Supports modern reproducibility better than other file synchronization approaches

  • Portable, open-source application that runs on any any computer, track any file, Works in enterprises including any university

  • Git is available on OIT’s GitLab and protected networks.

+ △

+

  • Many free gui clients

  • Works on any OS

  • A workhorse

  • Typically, you will use only 4-8 commands

  • Pays huge dividends per investment

  • Command-line UX

  • Can be a challenge to install/configure

  • The initial learning curve can feel steep (short hill)

Moral


♠ ♠ ♠

Use Git for projects

version control, collaboration, and reproducibility


Choose the right tools for the job