Skip to content

Instantly share code, notes, and snippets.

@samkcarlile
Created October 27, 2021 16:06
Show Gist options
  • Save samkcarlile/c2ddb491b21bf6d9a5ab800e95d9e871 to your computer and use it in GitHub Desktop.
Save samkcarlile/c2ddb491b21bf6d9a5ab800e95d9e871 to your computer and use it in GitHub Desktop.
git checkout with fzf
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