1.4. The GitHub Workflow

If you are

  1. Working on an assignment,

  2. Working on a project,

  3. Or taking notes in class (aka every class meeting)

Then use the 3 step GitHub workflow below!

In summary:

Fetch first, commit frequently, push often!

This habit will help you avoid disasters so that you get the positive features of GitHub without the headaches.

Being careful about these steps might seem pointless during solo projects, but I encourage you to practice these good habits now so that when you do collaborative work, you’re protected from mistakes.

1.4.1. The workflow, explained

On your last push of any day

At the end of your work session, before your last push of the day: Clear all outputs, delete temp files, and then run the whole directory (whether it is multiple scripts or a single script) to make sure the outputs reproduce! (Check: Did it work right?)

Quick trick: If the project uses notebook files, always look to see if the first executed code block has “[1]” next to it and that all the subsequent code blocks are numbered consecutively.