#!/bin/bash SEPARATE_LINE="\033[35m--------------------------------\033[0m" echo -e "\033[36m######################\033[0m" echo -e "\033[36m# GIT AUTO REBASE #\033[0m" echo -e "\033[36m# author Kaii #\033[0m" echo -e "\033[36m# version 1.2.1 #\033[0m" echo -e "\033[36m######################\033[0m" echo echo -e "\033[36mAUTO REBASE STARTING\033[0m" echo -e $SEPARATE_LINE
current_branch=`git symbolic-ref --short -q HEAD` git_status=`git status | grep "nothing to commit" | wc -l` # git_status!=0 means nothing to add&stash # git_status=0 means something to add&stash