File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed
Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ script_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
4+ source " $script_dir /../shellmenu.sh"
5+ source " $script_dir /ezk-git-functions.sh"
6+
37function revertLastCommit () {
48 echo " Enter YES if you want to revert to last commit:"
59 read cname
@@ -44,21 +48,20 @@ function resetToCommitHard () {
4448 git reset --hard $cname
4549}
4650
47- while ${continuemenu:= true} ; do
48- clear
51+ atucStatus () {
52+ coloredLog " ALWAYS PREFER REVERT " " $clrPurple " " $clrWhite " && printf " \n\r"
53+ echo
54+ echo " NOTE: if your work with remote repos and already
55+ pushed commits that you want to undo -> PREFER REVERT !!"
56+
57+ }
58+
4959menuInit " Undoing changes"
50- coloredLog " ALWAYS PREFER REVERT " " $clrPurple " " $clrWhite " && printf " \n\r"
5160submenuHead " Undoing changes"
5261menuItem a " Revert last commit - (keep commit history - create new commit)" revertLastCommit
5362menuItem b " Revert commit - (keep commit history - create new commit)" revertToCommit
5463menuItem c " (Soft) Reset commit - (delete some commits - keep current working dir)" resetToCommit
5564menuItem d " (Hard) Reset commit - (delete some commits - overwrite working dir)" resetToCommitHard
5665menuItem e " Undo local changes (only effects untracked files)" clean
57-
58- echo
59- echo " NOTE: if your work with remote repos and already
60- pushed commits that you want to undo -> PREFER REVERT !!"
61-
62- choice
63- done
66+ startMenu " atucStatus"
6467noterminate
Original file line number Diff line number Diff line change @@ -33,5 +33,5 @@ menuInit "Maven demo menu"
3333 menuItem e " Show effective settings" " mvn help:effective-settings"
3434 menuItem r " Show local repo location" " mvn help:evaluate -Dexpression=settings.localRepository | grep -v '\[INFO\]'"
3535 menuItem l " Show global settings file location" showGlobalSettingFile
36- startMenu " pwd "
36+ startMenu " echo /Users "
3737echo " bye, bye, homie!"
Original file line number Diff line number Diff line change @@ -11,5 +11,5 @@ menuItem c "Clean all" "mvn clean:clean"
1111menuItem x " Compile" " mvn clean compile"
1212menuItem t " Test" " mvn clean test"
1313menuItem i " Install" " mvn clean install"
14- startMenu " pwd "
14+ startMenu " echo /Users "
1515echo " bye, bye, homie!"
You can’t perform that action at this time.
0 commit comments