Connected Lab 9

Using the Overall Workflow with a Remote Repository

In this lab, you’ll simulate working in an environment where multiple users are making changes to a remote repository. You’ll see how to deal with getting rejected by Git, and also get some practice with techniques like rebasing.


This lab requires that you have Internet access and have completed Connected Lab 8: Setting up a GitHub Account and Cloning a Repository. You will be working from the same directory that you used in Connected Lab 8.


  1. At the end of Connected Lab 8, you cloned a repository from GitHub into two different directories on your local system: calc2 and calc_other. You’ll use these two directories to simulate two users working against the same remote repository. Change into the calc_other directory.
    $ cd calc_other
  2. To see what features your calculator already has, open up the calc.html program in a browser and take a look. Note that you have access to the basic arithmetic functions: addition, subtraction, multiplication, and division.
  3. You want to incorporate some other features into your calculator program from the features branch. First, you need to set up a local features branch, so create a local branch that tracks the remote features branch.
    $ git branch features origin/features
  4. Look at what features are available for you to use.
    $ git log --oneline features
  5. Now, let’s create a temporary branch to use as we work on incorporating these features. Create a new branch cpick ...

Get Professional Git now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.