-
-
Save aaccioly/4e724ec10d892fb0f90c93cf5cebd262 to your computer and use it in GitHub Desktop.
Select a fixup commit using fzf
This file contains hidden or 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/sh | |
| upstream=$(git rev-parse --abbrev-ref @{upstream} &> /dev/null) | |
| if [ -z ${upstream} ];then | |
| upstream=origin/master | |
| fi | |
| parent=$(git log --oneline ${upstream}..HEAD | \ | |
| fzf --height ${FZF_TMUX_HEIGHT:-40%} | \ | |
| cut -d' ' -f1) | |
| git commit --fixup=${parent} "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment