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

    Docker: how to build and push a Git repository to Docker Hub

    Written by

    in

    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…

    Read more

  • Git: how to compare two branches

    Git: how to compare two branches

    Written by

    in

    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…

    Read more

  • Git: create empty commit to trigger an action

    Git: create empty commit to trigger an action

    Written by

    in

    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:

    Read more

  • Setup GitLab Runner for Docker containers on Synology NAS

    Setup GitLab Runner for Docker containers on Synology NAS

    Written by

    in

    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…

    Read more

  • VI oder VIM beenden

    Written by

    in

    Um den bei vielen Linux und Unix Installationen und Tools (wie bspw. git) standardmäßig genutzten VI Editor zu beenden muss man mit der “ESC”-Taste in den Kommandomodus wechseln (am besten mehrfach drücken um ggf. schon eingegeben Kommandos abzubrechen). Und dort dann eingeben und Enter drücken.Dies beendet VIM wenn vorher nichts geändert wurde. Wurde etwas am…

    Read more

  • Git: Unterschied zwischen ‘git pull’ und ‘git fetch’

    Written by

    in

    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…

    Read more

  • Git: commit-Message korrigieren bzw. bearbeiten

    Written by

    in

    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"

    Read more