Skip to content

Commit a71f997

Browse files
committed
fix(gitutils): 🐛 fix rebase
1 parent bc0cdb8 commit a71f997

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/gitutils/_git-fix-base.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ eval $(
66
p - push force push changes to remote
77
d - dryrun show what would be done without making changes
88
- target target target branch to rebase commits onto
9-
- source source source branch to take commits from (default: current branch)
9+
- source source source branch to take commits from (default: current branch)
1010
help
1111
)
1212

src/gitutils/_git-release-hotfix.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,15 @@ fi
4949
#### PREVENT GIT EDITOR PROMPT
5050
GIT_EDITOR=:
5151

52-
current=$(echo "$main" | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\1.\2.X/')
52+
hotfix=$(echo "$main" | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\1.\2.X/')
5353

5454
#### START HOTFIX
55-
git flow hotfix start $current
55+
git flow hotfix start $hotfix
5656

5757
#### RESTORE STATUS AND HANDLE REBASE
5858
if [ -n "$rebase" ]; then
5959

60-
zz_log i "Rebasing: inverting develop and hotfix branches..."
61-
62-
git fix base hotfix/$current develop
60+
zz_log i "Rebasing develop commits onto hotfix branch..."
61+
git fix base -p hotfix/$hotfix
6362
fi
6463

0 commit comments

Comments
 (0)