diff --git a/.local/bin/scripts/git-l b/.local/bin/scripts/git-l index df54615..248b459 100755 --- a/.local/bin/scripts/git-l +++ b/.local/bin/scripts/git-l @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash git rev-parse @{upstream} >/dev/null 2>&1 || git branch --set-upstream-to=@{push} git pull --rebase --autostash "$@" 2> >(head -3 >&2) || diff --git a/.local/bin/scripts/git-unamend b/.local/bin/scripts/git-unamend index fabcc5e..1bcc155 100755 --- a/.local/bin/scripts/git-unamend +++ b/.local/bin/scripts/git-unamend @@ -1,5 +1,5 @@ #!/bin/sh # Remove the given files from the last commit -#git diff -p HEAD~ -- "$@" | git apply --reverse --cached +# https://stackoverflow.com/a/70197343 git reset HEAD~ "$@" -git commit --amend +git commit -v --amend