Finish Git, Github




CS174

Chris Pollett

Apr 5, 2017

Outline

Branches, Merging Branches

Example resolving conflicts

Making patches

Let's Experiment

  1. If you don't already have Git, you can download it from https://git-scm.com/.
  2. For this let's experiment, create a fresh git repository in a folder my_fresh_repo. Make a file test.txt with the words Commit early in it.
  3. Add this file to your repository and make an initial commit.
  4. Do the following three times: Reopen the file add to the end of it, the words Commit often. Commit this change.
  5. Make a patch from your second commit to HEAD, and post it as your solution to the Apr 5 In-Class Exercise.

Git Tags

Issue Tracking

GitHub

Getting started with GitHub

GitHub Work Flows

GitHub Work Details -- Getting a copy

  • In details what happening, is clicking fork gives you a copy in your user account space of that repository. For example, the original repository might have been:
    https://github.com/ORIGINAL_USERNAME/PROJECT.git
    your fork wil be
    https://github.com/YOUR_USERNAME/PROJECT.git
  • To get a copy on your laptop of your fork, you just clone that address:
    git clone https://github.com/YOUR_USERNAME/PROJECT.git
    
  • To make sure you can stay in sync with the original repository we need to add an upstream source for our clone:
    git remote add upstream https://github.com/ORIGINAL_USERNAME/PROJECT.git
    
  • GitHub Work Details -- Working locally, Synchronization, Pull Requests