dotfiles/.local/bin/scripts/git-snap

4 lines
142 B
Plaintext
Raw Normal View History

#!/bin/sh
# Save HEAD commit hash to "snap" file in git dir
echo Snapped $(git rev-parse HEAD | tee "$(git rev-parse --git-path ${1:-snap})")