PAI 789 Advanced Policy Analysis

Guidelines for Using GitHub

A few tips on how to use GitHub in this course.

How Often to Make Commits

As a general rule, you'll be a lot better off if you make frequent small commits rather than waiting and committing a lot of changes at once. With small commits you can lock down changes one at a time. That way, if a subsequent change breaks things, you'll know exactly what caused the problem and you'll be able to revert to an earlier version easily. It essentially gives you a high-powered undo button.

How Much Detail to Include in a Commit Message

As a rough rule of thumb, put in a short message that you yourself would find useful if you look back at the repository a year from now. It doesn't have to be long since the actual changes will be clearly visible. It's probably most useful to give a short high-level explanation along the lines of "Fixed bug that caused results to be sorted incorrectly" or "Updated documentation".

When to Push Changes to the Web

The short answer is whenever you want: there's no problem pushing the repository again if you make more changes to your code. Beyond that, you should definitely push it when you're submitting it for grading, or if you have a question and want me to look at it (see below).

How to Check that Your Push Was Successful

If you're new to GitHub and aren't completely comfortable with how it works, you can check whether a push succeeded by going on the GitHub web site and looking at the repository. You'll be able to tell from the log field or from the list under the "commits" button whether your latest changes are there.

Site Index | Zoom | Admin
Peter J Wilcoxen, The Maxwell School, Syracuse University
Revised 02/07/2021