Last active
August 29, 2015 14:03
-
-
Save doloopwhile/0979904bd854d2856780 to your computer and use it in GitHub Desktop.
git-rebase-i-peco: select rebase -i target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o pipefail | |
set -e | |
HASH=$(git log --oneline | peco | cut -d " " -f 1) | |
if [ "$?" -ne 0 -o -z "$HASH" ]; then | |
exit 1 | |
fi | |
git rebase -i "$HASH" $@ | |
# install: | |
# * install peco if needed | |
# $ mkdir -p ~/bin && cd ~/bin | |
# $ wget https://gist.githubusercontent.com/doloopwhile/0979904bd854d2856780/raw/2d6ad7c0c07130bf594dffe941b2535dde9d6569/git-rebase-i-peco | |
# $ chmod +x ~/bin/git-fixup-peco | |
# $ git config --global alias.fp fixup-peco |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment