File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 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
349349
350350 # Sanity checks
351351 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 "
355356
356357 # 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 '. "
358359
359360 echo
360361 echo " Summary of actions:"
361362 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 ) '"
363364 echo
364365}
365366
You can’t perform that action at this time.
0 commit comments