What is Git (and GitLab)?
Git is a software tool which enables a directory (including sub-directories) on a filesystem to be tracked for file changes with respect to time. It was designed and developed specifically for software code changes to be tracked, and is best suited for computer files based on ASCII (or unicode) text. Once a directory has been activated to be used with git, it may be considered a git "repository".
GitLab is a web interface which is able to serve as the remote "host" for a git repository, by receiving changes from external users and merging them to the "master" or "main" branch. It may also be used to host a code for external access (private or public), and it may also be configured for automated tasks related to the contents of a repository. In this way, a group of people may all work independently on a project, with the GitLab serving as the central repository for collecting all individual changes. Note that GitLab may be installed on specific servers, notably 4MOST uses AIP to host an installation of GitLab, which is different from the "public" GitLab website.
Useful links:
- Git software project homepage: https://git-scm.com/
- GitLab software project homepage: https://about.gitlab.com/
- 4MOST GitLab server: https://gitlab.4most.eu/
How does GitLab work?
The 4MOST GitLab functions similar to many other git-based web interfaces. Within 4MOST, we strive for all software to be hosted within GitLab and all such software may also be subject to
A tutorial was once provided by Ole Streicher (AIP) during an IWG1 meeting, which may be freely used by others as training material:
- https://4most.mpe.mpg.de/misc_support/IWG1_28072021_meeting.mp4
- Support material: https://gitlab.4most.eu/-/snippets/11
Git may be used as a command-line tool or via sophisticated text editors, here are external tutorials which may be useful:
- Official Git tutorial: https://git-scm.com/docs/gittutorial
- Official GitLab tutorials: https://docs.gitlab.com/ee/tutorials/
- Git branching & merging: https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
- Git feature branches: https://bocoup.com/blog/git-workflow-walkthrough-feature-branches
Disclaimer: we cannot help with all merge issues, these notes are only aimed toward getting you up to speed.