date | draft | weight | title |
---|---|---|---|
2016-03-14 |
false |
213 |
Lab - Git Pull Request |
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.
-
In a new tab, Create a Github account or Login
-
Navigate to the Alta3 OpenStack Glossary project
https://github.com/alta3/openstack-labs
-
Star the repository
Staring is like a bookmark on github.com, you can view and search your stared repositories at github.com/stars
-
Navigate to (click on) a file you would like to edit. The this example will add a new glossary term to our glossary.
-
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.
-
Make a change, in this example we add a fictitious new OpenStack Service "Aardvark"
-
After you are finished editing, **scroll to the bottom and add a descriptive commit message and click "Commit Changes"
-
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.
-
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.
-
Create the pull request
-
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.
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.