--- config: look: handDrawn --- flowchart TB a["Create Working Directory"] --> b["Create a Repository"] b --> c["Create/change file"] c --> d["Add to Staging Area (Index)"] d --> c d --> e["Commit to Repo"] e --> c
git
and GitLab, Pt. 1
Hochschule für Musik, Theater und Medien – Hannover
Institut für Musikphysiologie und Musiker-Medizin
2025-05-23
git
git
makes version control easier, comprehensible, and more secure
git
eases the pain of merging conjointly edited filesgit
installed?git
usually comes installed on Linux and MacOS computers
Wanna make sure?
terminal
and hit the ⏎ keygit version
terminal
git version
If you get a version number as response, git
is installed on your computer
git
If you got an error message as response to git version
, you first have to install it.
To install git
, go to
https://git-scm.com/downloads
git
To configure git
for your computer system, in a Terminal type:
git config --global user.name "your-git-handle"
1
followed by
git config --global user.email "your.name@ivy.edu"
If you use git
on the same computer with a different username and/or email address for some projects, you need to do this again with the project-related information in each of the other projects’ top folders without!!! the ‘--global
’ switch.
In a Terminal, type:
cd ~
followed by
ls .ssh/
If this does not throw an error but shows at least something like
id_rsa id_rsa.pub
you do have an SSH key. 🥳
In case you do not have an SSH key, in a Terminal, type:
ssh-keygen
This yields the response:
Generating public/private rsa key pair.
Enter file in which to save the key (/home/testuser/.ssh/id_rsa):
Accept the default by hitting the Return key
Created directory '/home/testuser/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/testuser/.ssh/id_rsa
Your public key has been saved in /home/testuser/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:<very-long-hash> testuser@mac3
The key's randomart image is:
+---[RSA 3072]----+
| .o o...|
| + ..|
| o+....|
| .. .+*...|
| oS . o++. |
| . E oo. = o= +|
| o .o+.+.A. B.|
| ... oo.+.+o o|
| .. .++.. .o.|
+----[SHA256]-----+
testuser@mac3:~$
The command
ls ~/.ssh
should now return the files containing the private and the public SSH key:
id_rsa id_rsa.pub
git
?git
Workflow—An Overview--- config: look: handDrawn --- flowchart TB a["Create Working Directory"] --> b["Create a Repository"] b --> c["Create/change file"] c --> d["Add to Staging Area (Index)"] d --> c d --> e["Commit to Repo"] e --> c
Thank you for your attention!
IMMM 2025