Skip to content

Latest commit

 

History

History
84 lines (45 loc) · 3.39 KB

PullRequest.md

File metadata and controls

84 lines (45 loc) · 3.39 KB
date draft weight title
2016-03-14
false
213
Lab - Git Pull Request

Lab Duration: 20 minutes

Lab Objective

The objective of this lab is to give students a basic introduction to git and git pull requests. Many open source projects rely on git for decentralized collaboration including OpenStack.

1. Setup Github Account (If you have not already done so)

  1. In a new tab, Create a Github account or Login

    Create an account

  2. Navigate to the Alta3 OpenStack Glossary project

    https://github.com/alta3/openstack-labs

  3. Star the repository

    Star this repository

    Staring is like a bookmark on github.com, you can view and search your stared repositories at github.com/stars

2. Fork the project )If you have not already done so)

  1. Fork the lab repository into your account

    Fork this repository

    Fork this repository

    Fork this repository

3. Edit a file in the repository

  1. Navigate to (click on) a file you would like to edit. The this example will add a new glossary term to our glossary.

    click on glossary

  2. The file contents are sumarized on this page. Additionally we can perform operations that give us insights about this specific file (i.e. length, size, authors, and change history). Click the edit file icon to make a new change.

    click edit

  3. Make a change, in this example we add a fictitious new OpenStack Service "Aardvark"

    aardvark service

  4. After you are finished editing, **scroll to the bottom and add a descriptive commit message and click "Commit Changes"

    commit

    changes

4. Create a Pull Request

  1. Navigate back to the project base page. Notice that our branch is now ahead of the master branch. Let's create a pull request to get our addition added back into the main repository. Click the "Pull Request" link.

    pull request

  2. On the pull request page, first scroll down to see the list of changes in this request. It should only be our added Aardvark service highlighted in green. If we had removed lines they would be highlighted in red.

    changes

  3. Create the pull request

    pull request create

    finished request

  4. At this point your instructor will accept the changes. Below is a screenshot of the email that is generated to a project maintainer when a pull request is submitted. Refresh your page a few times until your instructor accepts your changes.

    pull request email

    How does the page change after a pull request has been accepted?

You should now have a basic familiarity with most of the git processes as realized within the GitHub ecosystem.
Please remember that these are the most basic types of functionality and most developers will manage these processes from their own tools within their development environment.