diff --git a/g b/g index 848130a..9824a5f 100755 --- a/g +++ b/g @@ -12,18 +12,22 @@ action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose #exit if [[ $action == "Add all && Commit && Push" ]]; then - git add . commit_message=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --title "$action" --inputbox "Enter the commit message:" 8 40) + git add . git commit -"m $commit_message" git push elif [[ $action == "Add all && Commit" ]]; then - git add . commit_message=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --title "$action" --inputbox "Enter the commit message:" 8 40) + git add . git commit -"m $commit_message" -elif [[ $action == "Reset soft" ]]; then - git reset +elif [[ $action == "Reset soft" ]]; then + if DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --yesno "Do you wanna soft reset git?" 10 40; then + git reset + fi elif [[ $action == "Reset hard" ]]; then - git reset --hard + if DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --yesno "Do you wanna hard reset git?" 10 40; then + git reset --hard + fi elif [[ $action == "Status" ]]; then git status elif [[ $action == "Clone submodules" ]]; then