Skip to content

Latest commit

 

History

History
92 lines (75 loc) · 3.34 KB

lec07.md

File metadata and controls

92 lines (75 loc) · 3.34 KB

Lecture #7: Managing collaborative contributions and conflicts

Lecture Objectives

  1. add remote repos to your local clone
  2. create a pull request
  3. comment on a pull request
  4. ensure that your fork (and clone) are synchronized with changes in the "upstream" repo
  5. amend a pull request based on feedback
  6. identify and resolve conflicts

Textbook Reference

Chapter 16, pages 379-384

Activities

  1. Pull requests (20 min)

    1. definition of pull request - cloud service specific
    2. launch pull request from your repo
    3. examine pull requests
    4. comment on someone else's pull request
      • opportunity to practice effective communication (e.g. please & thankyou)
      • comment on individual lines
      • comment on the pull request on the whole
    5. Notice access controls
    6. request a review from your pull request
  2. Keeping your repo in sync (15 min)

    1. merge gonuke pull request
    2. review your PR - has it changed?
    3. add uw-ne as remote
    4. fetch uw-ne
    5. look at branches
    6. compare branches: esp. master vs uw-ne/master
    7. rebase master onto uw-ne/master
    8. push your master branch to your repo to keep it sync'ed
    9. switch to your element branch
    10. rebase your branch onto uw-ne/master (or master)
    11. push your element branch to your repo now that it's rebased
    12. review your PR - has it changed?
  3. Update your PR (10 min)

    1. switch to your element branch
    2. make (at least) one edit/add/commit cycle (perhaps respond to comment?)
    3. push your branch to your repo
    4. review your PR - has it changed?
  4. Add a common file (10 min)

    1. add a file in the top directory called completed.md
    2. The first line should read "# List of completed elements"
    3. The third line should be the name of your element's directory and its english name.
    4. add/commit this new file
    5. push this branch to your repo and check the status of your PR
  5. managing merge conflicts (merge additional PR causing conflict)

    1. check the status of your PR
    2. fetch uw-ne
    3. rebase your element branch onto uw-ne
    4. conflict - note options: abort, continue, skip
    5. open file with conflict and choose the correct final edits
    6. add that file (but do NOT commit)
    7. continue rebase
    8. push your branch to your repo
    9. check the status of your PR
  6. connect to someone else's Chart of Nuclides repo (15 min)

    1. add gonuke as remote
    2. fetch gonuke's repo
    3. look at branches
    4. compare branches

Bonus topics

  1. Change your prompt to constantly show you some git status information

    There are a number of different solutions shared on the internet for changing your bash prompt to show you the current branch you are in, and other information. Here are just a few:

  2. Your life will be much simpler if you don't have to type your password every time you interact with github. I encourage you to set up an ssh key for this: