Add new git commands
This commit is contained in:
parent
35af86de58
commit
0e8df7e6d5
15
g
15
g
|
@ -6,7 +6,7 @@ cat > /tmp/.dialogrc << EOL
|
||||||
tag_color = (BLACK,WHITE,ON)
|
tag_color = (BLACK,WHITE,ON)
|
||||||
EOL
|
EOL
|
||||||
set +ex
|
set +ex
|
||||||
action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose the action for git" 10 40 0 'Add all && Commit && Push' 1 "Add all" 2 "Commit" 3 "Push" 4 "Status" 5)
|
action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose the action for git" 10 40 0 'Add all && Commit && Push' 1 "Add all && Commit" 2 "Reset soft" 3 "Reset hard" 4 "Status" 5 "Clone submodules" 6)
|
||||||
|
|
||||||
#echo $action
|
#echo $action
|
||||||
#exit
|
#exit
|
||||||
|
@ -16,13 +16,16 @@ if [[ $action == "Add all && Commit && Push" ]]; then
|
||||||
commit_message=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --title "$action" --inputbox "Enter the commit message:" 8 40)
|
commit_message=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --title "$action" --inputbox "Enter the commit message:" 8 40)
|
||||||
git commit -"m $commit_message"
|
git commit -"m $commit_message"
|
||||||
git push
|
git push
|
||||||
elif [[ $action == "Add all" ]]; then
|
elif [[ $action == "Add all && Commit" ]]; then
|
||||||
git add .
|
git add .
|
||||||
elif [[ $action == "Commit" ]]; then
|
|
||||||
commit_message=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --title "$action" --inputbox "Enter the commit message:" 8 40)
|
commit_message=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --title "$action" --inputbox "Enter the commit message:" 8 40)
|
||||||
git commit -"m $commit_message"
|
git commit -"m $commit_message"
|
||||||
elif [[ $action == "Push" ]]; then
|
elif [[ $action == "Reset soft" ]]; then
|
||||||
git push
|
git reset
|
||||||
|
elif [[ $action == "Reset hard" ]]; then
|
||||||
|
git reset --hard
|
||||||
elif [[ $action == "Status" ]]; then
|
elif [[ $action == "Status" ]]; then
|
||||||
git status
|
git status
|
||||||
|
elif [[ $action == "Clone submodules" ]]; then
|
||||||
|
git submodule update --init --recursive
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue