Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Workshop 4 Git(Hub) workflows, Pull Requests, resolving conflicts

Marc Hanheide edited this page Oct 17, 2018 · 7 revisions

This week, you shall all start using GitHub for our development process. We will learn about forking, pulling, merging

You may find the official GitHub Desktop Client useful for you daily work, but also learn the command line tools!. To install the unofficial build for Linux, execute this script, then launch it with the (very inaptly named) command desktop.

Make sure you look at the useful resources for today's session.

Task 1

Look at https://guides.github.com/introduction/git-handbook/ and Find the Section "Example: Start a new repository and publish it to GitHub"

  1. Do those steps to put your source code into a remote GitHub (public) repository that you created.
  2. Team up with somebody else, can git clone their respective repository.
  3. Each of you edit some files in your local own repository and discuss how the other one can get them.

Task 2

  1. Fork https://github.com/LCAS/CMP9767M into your own github account (if you haven't done so yet), then clone on your computer
  2. create a new branch from the master branch, named week_4 and make sure you are working in that branch (how can you check?)
  3. create and commit a file mytest.txt in branch week_4 with content:
    this is some
    text I include in this file
    
  4. check out branch master again (where did you file go?)
  5. check out a new branch week_4_sidetrack based on master
  6. create and commit again a file mytest.txt in branch week_4_sidetrack with content:
    this is some MORE
    text I include in this file
    
  7. check out week_4 again
  8. merge week_4_sidetrack into week_4 (you'll have a conflict to resolve)

Task 3

  1. Add your code from previous weeks into its own package in a separate branch (e.g. week_3), based on the master branch.
  2. Open a "pull request" against the master branch of https://github.com/LCAS/CMP9767M.
  3. Observe the continuous integration output

Task 4 (optional)