Skip to content

Instantly share code, notes, and snippets.

@dwdzdc
dwdzdc / gist:490dd36bf754ea44d3a6baffe6a7cb6e
Created April 9, 2026 09:59
Amend last commit and append message
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Usage: git_amend \"text to append\""
exit 1
fi
git commit --amend -m "$(git log -1 --pretty=%B)
$*"
@dwdzdc
dwdzdc / gist:2ef1b06b60ec7d0f424b28ff9a1f2ebd
Created April 9, 2026 08:45
Local CLI diff review with fzf, helix, delta
#!/bin/bash
if [ "$#" -eq 0 ]; then
diff_args=""
elif [ "$#" -eq 1 ]; then
diff_args=" \"$1\""
elif [ "$#" -eq 2 ]; then
diff_args=" \"$1\" \"$2\""
else
echo "usage: review_diff [<commit>] [<commit>]" >&2