diff --git a/bin/g b/bin/g index fbc752b..fd14225 100755 --- a/bin/g +++ b/bin/g @@ -235,30 +235,30 @@ fi current_branch=$(git rev-parse --abbrev-ref HEAD) if [[ "$current_branch" == "$2" ]]; then if confirm "You are currently on the branch '$2'! Do you want me to switch to 'master'?"; then - echo '' + echo git checkout master else - echo '' + echo fi fi git branch -d "$2" &>/dev/null if [[ "$?" -ne 0 ]]; then if confirm "The branch '$2' hasn't been merged. Are sure you want to delete this branch?"; then - echo '' + echo git branch -D "$2" else - echo '' + echo fi fi ls $(git_root)/.git/refs/remotes/*/$2 &>/dev/null if [[ "$?" -eq 0 ]]; then if confirm 'Would you like to delete this branch on the remote as well?'; then - echo '' + echo git push origin --delete "$2" else - echo '' + echo echo 'OK, just thought I'"'"'d ask.' fi fi @@ -332,10 +332,10 @@ for local_branch in $branches; do # Detect and delete branches not on remote else if confirm "Failed to fast forward local branch '$local_branch'. Do you want to delete the local branch if it's merged?"; then - echo '' + echo git branch -d "$local_branch" else - echo '' + echo fi fi fi @@ -415,10 +415,10 @@ if [ ! -z "$tags" ]; then if confirm "Would you like to push these tags (${tags}) to the remote as well?"; then local_branch=$(git rev-parse --abbrev-ref HEAD) remote=$(git config --get branch.$local_branch.remote) - echo '' + echo follow_tags='--follow-tags' else - echo '' + echo echo 'OK, just thought I'"'"'d ask.' fi fi @@ -557,13 +557,13 @@ git log --color \ | sed 's//expired/g' \ | sed 's//bad/g' \ | sed 's//error/g' -echo '' +echo ;; hist) git reflog HEAD@{now} --date=relative \ |awk '$5 ~ /checkout:/ { sub(/HEAD@/, "", $2); sub(/:/, "", $4); if (!seen[$10]++) print $10, $2, $3, $4}' -echo '' +echo ;; submodule) @@ -587,7 +587,7 @@ do echo "url = $url" cd "$gitroot" git submodule add "$url" "$reldir" - echo '' + echo done cd "$gitroot" git submodule init