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

    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

    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

    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: This is also described in the Git documentation: –allow-emptyUsually recording a commit that has the exact same tree as…

    Read more

  • Setup GitLab Runner for Docker containers on Synology NAS

    Setup GitLab Runner for Docker containers on Synology NAS

    By

    in

    The Synology NAS system provides a convenient way to install software packages. One of those packages is Docker, which can be used to install additional software. This posts describes how to install and register GitLab Runner for Docker on a Synology NAS. The setup described in this post has been tested on the following system:…

    Read more

  • Sourcetree keeps asking for password

    By

    in

    Normally, Sourcetree stores your login credentials so that it’s not necessary to re-enter them each time you push or pull you repository from your git server. But sometimes, Sourcetree keeps asking for password when committing or pushing data to a server. In this case, the following solution worked for me: Open the terminal and navigation…

    Read more

  • VI oder VIM beenden

    By

    in

    Der VI Editor wird bei vielen Linux und Unix Installationen und Tools (wie bspw. git) standardmäßig genutzt. Doch wie kann ich diesen beenden? Um diesen 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…

    Read more

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

    By

    in

    Git stellt verschiedene Befehle bereit, um die Daten eines Repositories mit dem lokalen Stand abzugleichen. Dazu gehören unter anderen git pull und git fetch. Beide Befehle holen Daten vom entfernten Repository, besitzen aber einen kleinen Unterschied. 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…

    Read more

  • Git: commit-Message korrigieren bzw. bearbeiten

    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