Adam Retter

adam@evolvedbinary.com
 

State of the Art in Healthcare
@ St Edmund Hall, Oxford
2025-04-03


@adamretter

Git and GitHub
for
Beginners

About Me

  • Director of Evolved Binary

    • UK - Software, Consultancy, Training, and R&D

  • Co-founder and Co-owner of eXist Solutions

    • Germany - TEI Publisher software

  • Software Engineer / Prolific Open Source contributor

    • eXist-db - 20 Years as Core contributor (last 9 as Main dev.)

    • RocksDB - 7 Years as RocksJava main developer

  • W3C XQuery Working Group - Invited expert

  • Founder of EXQuery, and creator of RESTXQ

  • Enjoys Research and Development, and Snowboarding

What is Git?

  • Distributed Version Control System

  • Open Source software (GPL 2.0)

    • Download from - https://git-scm.com

  • A set of tools that run from the command line

  • A protocol for sending/receiving changes - email / HTTP

  • Used in the development of most modern software

Why do you want to use Git?

  • You want to keep your source code somwhere safe

    • Works best with text based files

    • Doesn't have to be source code, e.g. Documentation

  • You want to keep a history of changes

  • You want to tag significant milestones

    • e.g. a new release version

  • You want to collaborate with others

  • You want to have a standard workflow for changing source code

Git Repository

  • Initially - Just a folder on your computer

    • With hidden folders/files containing metadata

  • Git is distributed

    • You can "pull" pull changes into your local copy

    • You can "push" changes from your local copy

  • You have a complete copy on your machine

  • Anyone else can also have a complete copy on their machine

  • You can also have copies on servers on the Web - e.g. GitHub.com

  • These are called "repositories"

    • Normal to have one per project

Git Maintains a History of Changes

  • A set of changes are known as a "commit"

    • Has an identifier (commit hash)

    • Has an author

    • Has an date

    • Has an user provided message/description

Time

t=0

t=1

t=2

History Can Have Branches

  • A branch has a name, and is:

    • An alternative timeline

    • Branched from an existing branch

    • A git repository starts with 1 default branch

      • Typically called: "main"

    • Branches can be merged back together

  • You can create as many as you like

  • Usual uses:

    • Developing a new feature

    • Fixing a bug

    • Experimentation

    • Making a distrubtive change

Branches

Time

main

feature/new-thing

bugfix/some-thing

Tagging Significant Events

  • You can "tag" a commit

    • Has a name

    • Has an author

    • Has an date

    • Has an user provided message/description

  • Can be used to identify/label releases

  • When looking at a tag, you can see:

    • The tag details (name, author, description, signature, etc.)

    • The commit

    • The entire history leading to that commit

GitHub