Russell Gordon

How to Commit and Push Your Code to GitHub

15 September, 2020

    After figuring something out, or making any kind of progress, you definitely don't want to lose that work!

    So, be sure to commit and push your work to GitHub often.

    Essentially, this is like making a micro-backup of your work.

    To do this, select the menu sequence Source ControlCommit... or use the keyboard shortcut Option-Command-C.

    In the sheet that appears, any files you have changed will be displayed.

    You can review the changes you made, if you like.

    Be sure to write a short but descriptive comment.

    Trust me... the few seconds it takes you to think of and write a meaningful comment will be super valuable down the road. Comments like "made changes" or "done" are not good comments! 😌

    Once you've got a descriptive comment written, be sure the Push to remote checkbox is enabled.

    Then press the Commit Files button or use the keyboard shortcut Command-Return.