What is Git?
Presenter: Christian Krippes
What is Git?
- Free open software (GNU GPL V2)
- Exists since 2005
- Tool for Linux kernel development
- Git is a distributed system for version control of software code
- Collaboration tool
- Available for Linux, MacOs, Windows
- Developed by Linus Torvalds
- Download here
Why do I need this?
- Versioning of files
- Allows distributed work of teams
- Everybody has a local copy of the project history.
- Supports especially “non-linear” development
Git becomes handy when you want to edit and version more than one file with more than one person
and it has to work more or less in parallel.
How does Git work
- Git takes a snapshot of what all your files look like
- Git “thinks” about version history more like a stream of snapshots
- A snapshot is called “commit”
- Each commit knows its predecessor, or “parent”.
- Each commit gets a timestamp, an author, and a checksum.
- When switching to an older commit, Git restores the state of your files
Working with Git
- Change and save file(s) (Change)
- Mark file (Stage)
- Write text annotation (Commit Message)
- Apply change (Commit)
- View a specific version (Checkout c2728e84)
Staging: When thinking of commits as snapshots, staging could be compared to choosing the frame of an image so
that your nasty uncle is not part of the family picture and therefore excluded from history.
File states
- modified - The file has been modified but the changes have not yet been saved to the git database.
- staged - Stages a file in its current version for the next commit (snapshot).
- committed - The changes are stored in the local git database.
Branches
- A branch is a pointer (name tag) to a specific commit
- HEAD is a pointer to the last commit of the currently used branch.
- When we switch branches, Git sets the working directory to the state of the branch
Resources
Use GitLab in a scientific environment
Presenter: Johannes Keyser
Summary
- GitLab is a collaboration platform built around Git.
- JLU has its own GitLab instance, which is open for everyone with a JLU-account.
- You can create projects for different aspects of a working group’s daily duties, like
general info, protocols, lab organization, experiments.
- You can collaborate on these topics within projects; there are issues or tickets to handle work
that has to be done.
- You can keep text documents within those projects, make version changes within the documents, and collaborate on those changes, e.g., discuss them.
- You can easily connect information within documents, tickets, or the wiki.
- You can write manuscripts
- You can use it as a kind of notebook/report tool for regularly updated data.
Resources
- You can find a list of more use-cases here
- If you need help with JLUs GitLab see this page.