brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: git stash push -m gives a stash a name you can find again

Git
~/tips/tip-git-stash-push-message

git stash push -m "login form, half done"

Saves your unfinished changes under a name, so git stash list tells you what each stash holds.

I like a plain git stash for about ten minutes. After that I forget what stash@{0} was.

git stash push -m "login form, half done"
git stash list
git stash pop stash@{1}

The message shows up in git stash list, so you pick the right one instead of guessing. Add -u when you also want your new, untracked files in the stash.

One caveat: pop deletes the stash after it applies cleanly. Use git stash apply if you want to keep it as a backup.

Further reading: git stash documentation

More Git tips git show-branch main feature git log --stat -5 git merge --no-ff feature -m "Merge feature" git merge --squash feature git merge --abort All Git tips (144) All topics

Link