ud775 ยป

Instructor Notes for Lesson 3


Morsel 5: Adding a Remote

Copy the HTTPS URL, not the SSH URL!

At 1:29, Caroline copies the URL to the repository. The video mistakenly shows the URL to use if the repository is accessed over SSH. The course assumes that the student will use HTTPS, not SSH. Please click on the HTTPS button and copy the URL that shows up for HTTPS. It will begin with https:// rather than git@github.com.

If you are interested in using SSH instead, you can follow the instructions here, but this is not recommended unless you are already familiar with SSH keys.

Sharing your reflections

We encourage you to be bold in sharing your reflections on GitHub.  If you're not happy with any of your responses, the best solution is to update that response in one or more new commits.  The previous response will still be visible in the commit history, but updating your perspective over time is part of the learning process! Having a commit history that shows your updating perspective will reflect well on you, not poorly.

That said, if you've written anything in your reflections repository that you are not comfortable sharing, you can checkout the commit before you introduced that change, create a new branch at that point, and commit any other changes you are willing to share to the new branch.  Then, by only pushing your new branch, you can keep the changes on your original branch private.

Morsel 12: Fork the Recipes Repository

Larry's repository on GitHub can be found here.

Morsel 23: Making a Pull Request

Sarah accidentally says that the local master is the only thing that changes when you run git pull origin master.  However, the working directory and staging area will also update when you run git pull.  That's why when you run git pull, you see your files update, not just the git log output.

Morsel 27: Updating Your Local Repository

Simulate Sarah's changes

To simulate Sarah's changes, first download the file sarah_changes_2.sh from the Downloadables section.  Then, using Git Bash or your terminal, cd to the directory where you've saved the file.  Then type bash sarah_changes_2.sh followed by a space, followed by the url to your fork.  For example, if Caroline were running the code, she would type bash sarah_changes_2.sh https://github.com/cbuckey-uda/recipes.git, but you should use the url for your fork, not Caroline's fork.  If you haven't set up password-caching, then you will be prompted to enter your GitHub username and password.

Note: This code will not actually create a pull request.  Instead, it will update the commit history on GitHub to make it look as though the pull request has already been merged.  You will not need to merge a pull request.  Instead, check for a commit on the master branch on GitHub with the message "Merge pull request".

Make sure you are on the master branch

You'll want to make sure you check out the master branch before following the steps in this video.

Use git add on the conflicting files before committing

Just as in lesson 2, before running git commit to create the merge commit, you'll need to use git add to add any files that had conflicts to the staging area.

Morsel 29: CM: Fork, Fetch, Pull Request

You can see the full final version of the concept map here, with all the nodes, including those we pruned in earlier versions.