wolfgang ziegler

„make stuff and blog about it“
Git Linux

Cache your git credentials on Linux.

git config --global credential.helper cache


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

vcgencmd get_throttled


Undo the last local (not yet pushed) commit.

git reset --soft HEAD~1


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


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

Revert single files that you just committed.

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


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


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


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

sudo service lightdm restart


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

git config --unset user.password