Add retroamend script
This commit is contained in:
parent
fc557f00d3
commit
ff9cb9b3a6
1 changed files with 17 additions and 0 deletions
17
files/bin/git-retroamend
Executable file
17
files/bin/git-retroamend
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Based on https://github.com/no-gravity/git-retroamend
|
||||
|
||||
set -e
|
||||
|
||||
hash=$1
|
||||
|
||||
if [[ ! -v hash ]]; then
|
||||
echo "Please provide hash."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git commit --fixup $hash
|
||||
|
||||
# 'GIT_EDITOR=true' makes the rebase non-interactive
|
||||
GIT_EDITOR=true git rebase -i --autosquash $hash^
|
Loading…
Reference in a new issue