function smart_checkout() {
git branch
echo "Type part of the branch you want to move?"
read word
for branch in $(git branch);
do
if [[ $branch == *$word* ]]; then
git checkout $branch
break;
fi
done
}
function get_branch() {
git branch --no-color | grep -E '^\*' | awk '{print $2}' \
|| echo "default_value"
}
alias push_origin='git push -u origin "$(get_branch)"'
alias clear_branches='git branch | grep -v "master" | xargs git branch -D'