@@ -408,18 +408,25 @@ def submit(ctx: click.Context) -> None:
408408 )
409409 current_branch = current_branch_result .stdout .strip ()
410410
411+ info ("Pushing all commits across all branches" )
412+ subprocess .run (["git" , "push" , "--all" , "origin" ], stderr = stderr , stdout = stdout )
413+ info ("Switching to submission branch" )
411414 subprocess .run (["git" , "checkout" , "submission" ], stdout = stdout , stderr = stderr )
415+ info ("Creating submission" )
412416 subprocess .run (
413417 ["git" , "commit" , "--allow-empty" , "-m" , "Submission" ],
414418 stdout = stdout ,
415419 stderr = stderr ,
416420 )
421+ info ("Pushing submission" )
417422 subprocess .run (
418423 ["git" , "push" , "origin" , "submission" ], stdout = stdout , stderr = stderr
419424 )
425+ info (f"Switching back to { current_branch } " )
420426 subprocess .run (["git" , "checkout" , current_branch ], stdout = stdout , stderr = stderr )
421427
422428 if not pr_exists :
429+ info ("PR does not exist yet, creating a new one!" )
423430 subprocess .run (
424431 [
425432 "gh" ,
@@ -442,7 +449,7 @@ def submit(ctx: click.Context) -> None:
442449 info ("Pull request created!" )
443450 time .sleep (5 )
444451 else :
445- info ("A submission pull request already exists." )
452+ info ("A PR already exists, the latest push should update it ." )
446453
447454 user_prs = get_user_prs (f"git-mastery/{ exercise_name } " , verbose )
448455 if len (user_prs ) == 0 :
0 commit comments