Skip to content

Latest commit

 

History

History
88 lines (52 loc) · 2.76 KB

readme.md

File metadata and controls

88 lines (52 loc) · 2.76 KB
title type duration creator competencies
Git and GitHub Intro Lab
Lab
1.25
name city
Jay Nappy
NYC
Workflow

Git and GitHub Intro Lab

Introduction

Note: This can be a pair programming activity or done independently.

Let's apply what we've learned from class to share and update each other's code. With a partner, you're going going to alternate between who 'drives' and who 'navigates' while following the requirements under "Exercise" below. The goal will be to create a text file containing a message, have a partner fork, clone, and add their own changes, submit the changes as a pull request, and then have the changes merged.

Be sure to look at the previous lesson for notes and helpful hints.

Exercise

Partners will be referred to as partner1 and partner2.

Part 1

With partner1 driving:

  • create a folder called git-and-github-practice
  • within that folder create a new text file
  • in that file, write a message to your partner.
  • initiate a git repository, commit your changes, and push to GitHub

With partner2 driving, from their computer:

  • get your partners link to the GitHub repository and fork and clone it
  • edit the file to add a new message back to your partner
  • commit your changes and submit a pull request back to partner1

With partner1 driving:

  • merge the pull request from the GitHub interface

Part 2

With partner2 driving:

  • create a folder called git-and-github-practice-two
  • within that folder create a new text file
  • copy and paste the code from the messages from the first part, and add an additional message for your partner.
  • initiate a git repository, commit your changes, and push to GitHub

With partner1 driving:

  • get your partner's link to the new GitHub repository - fork and clone it
  • open the text file, and add a message for your partner.
  • commit your changes and submit a pull request back to partner2

With partner2 driving:

  • merge the pull request from the GitHub interface

Bonus:

  • use the syncing a fork documentation to update partner2's local version of git-and-github-practice after partner 1 makes additional changes.

Deliverable

Each student should add a text file called "my_repo.txt" that contains a link to the new repo on their own Github account.

Additional Resources


Licensing

  1. All content is licensed under a CC­BY­NC­SA 4.0 license.
  2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].