File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -349,17 +349,18 @@ showcommands! Show git commands while executing them
349
349
350
350
# Sanity checks
351
351
require_clean_working_tree
352
- require_branch_absent " $BRANCH "
353
- git_do fetch -q " $ORIGIN "
354
- require_branch " $ORIGIN /$BRANCH "
352
+ require_local_branch_absent " $BRANCH "
353
+
354
+ git_do fetch -q " $ORIGIN " || die " Could not fetch branch '$BRANCH ' from remote '$ORIGIN '."
355
+ git_remote_branch_exists " $ORIGIN /$BRANCH "
355
356
356
357
# Create tracking branch
357
- git_do checkout -b " $BRANCH " " $ORIGIN /$BRANCH "
358
+ git_do checkout -b " $BRANCH " " $ORIGIN /$BRANCH " || die " Could not create branch ' $BRANCH '. "
358
359
359
360
echo
360
361
echo " Summary of actions:"
361
362
echo " - A new remote tracking branch '$BRANCH ' was created"
362
- echo " - You are now on branch '$BRANCH '"
363
+ echo " - You are now on branch '$( git_current_branch ) '"
363
364
echo
364
365
}
365
366
You can’t perform that action at this time.
0 commit comments