ud775 » project »

Project Instructions for How to Use Git and GitHub


Reflections Repository

Choose a main branch to submit

Follow the instructions within the course to share your reflections repository on GitHub.  You will choose a branch to be your main branch, and let your coach know to look at that branch.  For many students, this will be the master branch, but you may choose any branch.

Make sure all content is correct

You should make sure the commit at the tip of your main branch contains responses that are up-to-date with your current understanding of the material, as you will receive feedback on the content of your reflections as well as the Git history of your repository.  There are no right or wrong answers to the reflection prompts, but a passing project will not contain any incorrect statements about the material covered.  If you realize that any of your responses contains incorrect information, you should add one or more commits updating those responses.  Only the most recent commit needs to be accurate in order to pass.

Create a merge commit

In order to show your ability to create and merge branches, the branch you submit should contain at least one merge commit in its history.  If it this is not already the case, here is a good way to create one:

  1. Find two reflections for which you would like to update or add to your response
  2. Create two branches to make those changes in.  (Create both branches before making the changes to either.)
  3. Make the changes to each reflection in the appropriate branch.
  4. Merge both branches into your main branch.  The first merge will be a fast-forward merge, so no merge commit will be created, but the second merge will create a merge commit.

Make sure your commit history is clean

In order to show your ability to create a clean commit history, your commits should have good messages and be appropriately sized, with one commit per logical change.  If any of your commits does not have a good message, you can clean up the history as follows:

  1. Checkout the commit before the offending commit
  2. Create a new branch at that point.  This branch will become your main branch.
  3. Make the changes again, but this time committing in the desired manner.
  4. Re-commit any subsequent changes to your new main branch.  If you have a large number of commits you would like to copy to your main branch unchanged, you may wish to use Git's cherry-pick command.  By running git cherry-pick <commit_id>, pasting an actual commit ID rather than typing <commit_id>, you can create a new commit with the same changes as another commit.

Share content on GitHub

Make sure all content you wish to submit for review is pushed to your GitHub repository and is reachable from your main branch.

Create-Your-Own-Adventure Pull Request

Follow the instructions in the course to add to the create-your-own-adventure repository in a non-master branch of your fork.  Then submit that change to the original repository by making a pull request.  Follow the contribution guidelines in the README of the repository, and if necessary update your pull request addressing any comments left by your coach.