wolfgang ziegler


„make stuff and blog about it“
Docker

Remove all local Docker resources (images, containers, ...).

docker system prune -a

Git Linux

Persist your git credentials on Linux.

git config --global credential.helper store

RaspberryPi

Check for undervoltage problems on your Raspberry Pi. Should return throttled=0x0.

vcgencmd get_throttled

Git

Undo the last local (not yet pushed) commit.

git reset --soft HEAD~1

Git

Turn off page output (globally) for git commands (e.g. "git branch").

git config --global pager.branch false

Linux Tool

Generate text banners in your terminal.

sudo apt-get install figlet

Linux

Find out your mainboard model using Linux commandline.

sudo dmidecode -t 2

Ignore modified files due to changes in file permissions.

git config core.fileMode false
Git

Revert single files that you just committed.

git checkout HEAD~1 -- <path1> <path2>

Linux

If you want to logout from your Linux desktop session, but don't want to leave your terminal window.

gnome-session-quit

Git Linux

From time to time I clean up all the local branches that have assembled over time in a Git repository.

git branch | grep -v "main" | xargs git branch -D

Linux

Quick way to restart your Linux Desktop environment. Useful when trying out stuff that needs to run at startup.

sudo service lightdm restart

Git

Clear your git credentials (e.g. after a password change).

git config --unset user.password