File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -223,16 +223,15 @@ commit_push_and_create_pr() {
223
223
git config pull.rebase false
224
224
local branch_name=" bump-$( basename $feature ) "
225
225
git show-ref --verify --quiet refs/heads/$branch_name
226
+ git stash || { log_fatal " Failed to stash changes" ; } # Stash changes before checking the branch
226
227
if [ $? -eq 0 ]; then
227
228
git checkout $branch_name
228
- git stash || { log_fatal " Failed to stash changes" ; }
229
229
git fetch origin $branch_name || { log_fatal " Failed to fetch changes" ; }
230
230
git reset --hard origin/$branch_name || { log_fatal " Failed to reset to remote branch" ; }
231
- git pull origin $branch_name || { log_fatal " Failed to pull changes" ; }
232
- git stash pop || { log_fatal " Failed to pop stash" ; }
233
231
else
234
232
git checkout -b $branch_name
235
233
fi
234
+ git stash pop || { log_fatal " Failed to pop stash" ; } # Pop the stash after updating or creating the branch
236
235
git add " $version_file_path " || { log_fatal " Failed to add changes" ; }
237
236
git commit -m " $commit_message " || { log_fatal " Failed to commit changes" ; }
238
237
git push origin $branch_name || { log_fatal " Failed to push changes" ; }
You can’t perform that action at this time.
0 commit comments