File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed
Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,19 @@ cherryPick() {
3030 echo " Enter commit you want to pick:"
3131 read cname
3232 [ " ${cname} " = " " ] && waitonexit && return
33- git cherry-pick " $cname "
33+ git branch
34+ echo " Select target branch:"
35+ read cbranch
36+ [ " ${cbranch} " = " " ] && waitonexit && return
37+ git checkout $cbranch
38+ git cherry-pick $cname
39+ echo -n " Cherry picked $cname . Add files to stage(y/n)?" && wait_for_keypress
40+ [ " ${REPLY} " != " y" ] && waitonexit && return
41+ git add .
42+ git cherry-pick --continue
43+ echo -n " Push changes(y/n)?" && wait_for_keypress
44+ [ " ${REPLY} " != " y" ] && waitonexit && return
45+ git push origin $cbranch
3446}
3547
3648atlnStatus () {
Original file line number Diff line number Diff line change @@ -49,10 +49,9 @@ function resetToCommitHard () {
4949}
5050
5151atucStatus () {
52- coloredLog " ALWAYS PREFER REVERT " " $clrPurple " " $clrWhite " && printf " \n\r"
5352 echo
5453 echo " NOTE: if your work with remote repos and already
55- pushed commits that you want to undo -> PREFER REVERT !!"
54+ pushed commits that you want to undo -> PREFER REVERT OVER RESET !!"
5655
5756}
5857
@@ -65,11 +64,11 @@ checkoutWay() {
6564
6665menuInit " Undoing changes"
6766submenuHead " Undoing changes"
68- menuItem a " Just checkout contents of previous commit into working dir " checkoutWay
69- menuItem a " Revert last commit - (keep commit history - create new commit)" revertLastCommit
70- menuItem b " Revert commit - (keep commit history - create new commit)" revertToCommit
71- menuItem c " (Soft) Reset commit - (delete some commits - keep current working dir)" resetToCommit
72- menuItem d " (Hard) Reset commit - (delete some commits - overwrite working dir)" resetToCommitHard
73- menuItem e " Undo local changes (only effects untracked files)" clean
67+ menuItem a " Checkout a previous commit into workdir - (keep commit history - create new commit) " checkoutWay
68+ menuItem b " Revert last commit - (keep commit history - create new commit)" revertLastCommit
69+ menuItem c " Revert commit - (keep commit history - create new commit)" revertToCommit
70+ menuItem d " (Soft) Reset commit - (delete some commits - keep current working dir)" resetToCommit
71+ menuItem e " (Hard) Reset commit - (delete some commits - overwrite working dir)" resetToCommitHard
72+ menuItem f " Undo local changes (only effects untracked files)" clean
7473startMenu " atucStatus"
7574noterminate
You can’t perform that action at this time.
0 commit comments