diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..19a1672 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,15 @@ +function _branches() { + if [ -n "$1" ]; then + echo "$1" + return + else + git for-each-ref --sort=committerdate refs/heads/ | awk -F'heads/' '{ print $NF }' | fzf + fi +} + +function cb() { + branch=$(_branches) + git checkout "${branch}" +} + +