Created
October 27, 2021 16:06
-
-
Save samkcarlile/c2ddb491b21bf6d9a5ab800e95d9e871 to your computer and use it in GitHub Desktop.
git checkout with fzf
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
function gcz() { | |
if [[ -z $1 ]]; then | |
git checkout $(gb | fzf | tr -d ' *') | |
else | |
git checkout $(gb | fzf -1 -q $1 | tr -d ' *') | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment