Tag: Git
Git is a distributed version control system that allows multiple developers to collaborate on projects, track changes, and manage code revisions efficiently.
-
Docker: how to build and push a Git repository to Docker Hub
Written by
Docker Hub is a cloud-based repository provided by Docker that allows developers to store, manage, and share Docker container images. It serves as a central registry for Docker users to distribute their containerized applications and collaborate with others. To build and push a Git repository to Docker Hub, you can follow these steps: Step 1…
-
Git: how to compare two branches
Written by
Sometimes it’s necessary to get the difference between two branches. Git already provides a really powerful diff command which does exactly this: git diff is very powerful, as it not only compares two branches, it also allows multiple comparisons: Show changes between the working tree and the index or a tree, changes between the index…
-
Git: create empty commit to trigger an action
Written by
Sometimes it’s necessary to trigger an action for CI/CD, e.g. when you use GitLab. To do this without any changes on the code base, you can create an empty commit. For this, git has a command:
-
Setup GitLab Runner for Docker containers on Synology NAS
Written by
The setup described in this post has been tested on the following system: In addition, the following software packages have already been installed on the system using the Synology package manager: GitLab is installed via the Docker Registry: Install GitLab You can skip this part, if GitLab is already running on your Synology and continue…
-
Git: Unterschied zwischen ‘git pull’ und ‘git fetch’
Written by
Kurz gesagt: git pull führt ein git fetch und anschließend ein git merge aus. Ein git fetch kann man zu jeder Zeit machen, um die lokalen Branches zu aktualisieren und mit den entfernten Branches (origin, remote) abzugleichen. Diese Operation ändert dabei keine lokalen Branches, sie zeigt lediglich an, wenn Änderungen verfügbar sind. Man kann git fetch also bedenkenlos ausführen, ohne die lokale Arbeitskopie zu…
-
Git: commit-Message korrigieren bzw. bearbeiten
Written by
Möchte man die letzte Commit-Message eines bereits ausgeführten Commits bearbeiten, dann lässt sich das mit folgendem Befehl über die Konsole tun: git commit –amend Dies öffnet einen Texteditor in dem man die gewünschte Commit-Message eingeben kann. Die neue Commit-Message lässt sich auch sofort übergeben: git commit –amend -m "New commit message"