Reset approval

This commit is contained in:
Digital Studium 2024-04-06 17:26:44 +03:00
parent 0e8df7e6d5
commit 8e12cbd1bb
1 changed files with 9 additions and 5 deletions

12
g
View File

@ -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
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