diff --git a/.config/shell/git b/.config/shell/git index d464617..906d8d7 100644 --- a/.config/shell/git +++ b/.config/shell/git @@ -9,7 +9,7 @@ y() { yc() { local folder="${1:-${PWD/$XDG_CONFIG_HOME\/}}" echo "config/$folder:" >/tmp/yc-msg - yadm commit -v --template /tmp/yc-msg ${@:2} -- "$XDG_CONFIG_HOME/$folder"* + yadm commit -v --template /tmp/yc-msg ${@:2} -- "$XDG_CONFIG_HOME/$folder*" } gcn() { diff --git a/.local/bin/scripts/git-unamend b/.local/bin/scripts/git-unamend new file mode 100755 index 0000000..fabcc5e --- /dev/null +++ b/.local/bin/scripts/git-unamend @@ -0,0 +1,5 @@ +#!/bin/sh +# Remove the given files from the last commit +#git diff -p HEAD~ -- "$@" | git apply --reverse --cached +git reset HEAD~ "$@" +git commit --amend