2025-09-16
Version control tracks different version of files
Equivalently: it tracks changes made to files
In version control lingo, a “version” is also called commit
From the verb “commit”, which can mean
to consign or record for preservation;
to commit something to memory
Let’s visualize this
If unrelated changes are made…
… we may be able to merge them into one document
git
Goal: Add your GitHub username to the participants list via the web browser
go to the “participants” list on the Summer School website
locate the “Edit this page” link
use it and make the change (you need to insert 1 line)
create the pull request
Tell git who you are, via terminal:
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
Of course use your own name and email address instead 😬
Privacy warning: This data will be associated with your subsequent Git activity
Set your real name on GitHub: https://github.com/settings
For terminal users: install gh
via https://cli.github.com
If you use VS Code, install “GitHub Pull Requests” extension
A clone of a repository is a copy of all data and history
Original and copy may be on the same computer, or one or both on a remote computer
If both are on a remote computer, we call the copy a fork
All copies of the repo (including original) can now undergo history changes
Now the FUN starts: histories can diverge
Let’s visualize this
Fork the repository https://github.com/oscar-system/SummerSchool2025_Playground in the GitHub web interface.
Clone your fork to your computer. (Hint: git clone
)
In your local clone, in the solutions
directory: create a subdir with your name, in it add a file with solutions to some exercises.
Commit the new file and push to your fork. (Hint: git add
, git commit
, git push
)
pull
= fetch
+ merge
)In git there is usually an active branch
Making commits updates the active branch
Create a new branch using git branch NEWBRANCH
, list branches using git branch
Switch between branches using git switch
or git checkout
Merge diverging history with git merge
Let’s visualize this
git pull
our exercise repositoryREADME.md
to have the correct color; commit your changesmain
branch, and pull the latest version.git merge
the master branchgh
command line toolgh
tool from https://cli.github.comgh auth login
once