|
|
|
|
|
by lambda_dn
1938 days ago
|
|
Sure! Using Fish shell run the code below. abbr creates and abbreviation (slightly different from an alias and imho much more useful), see https://fishshell.com/docs/current/cmds/abbr.html My git checkout abbr requires git,fzf to be installed abbr --add ck 'git branch -a | string replace -a \'origin/\' \'\' | string replace -a \'remotes/\' \'\' | sort -u | fzf | read branch; git checkout $branch' To use just type ck and then you can narrow the branch list by typing some letters, then arrow keys to select the branch hit enter, boom. |
|