Skip to content

Latest commit

 

History

History
76 lines (41 loc) · 3.04 KB

13.md

File metadata and controls

76 lines (41 loc) · 3.04 KB

+++ date = "2015-09-30" draft = true weight = 13 title = "Lab 13 - Git" +++

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

  1. In a new tab, Create a Github account or Login
![Create an account](https://i.imgur.com/uTDaD5s.png)
  1. Navigate to the Alta3 OpenStack Glossary project
`https://github.com/alta3/openstack-labs`      
  1. Star the repository
![Star this repository](https://i.imgur.com/LLAQVg7.png)

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

2. Fork the project

  1. Fork the lab repository into your account
![Fork this repository](https://i.imgur.com/JJc2Dht.png)

![Fork this repository](https://i.imgur.com/S9iDb2e.png)

![Fork this repository](https://i.imgur.com/Ro71WF6.png)

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

![click on glossary](https://i.imgur.com/jhmtH0h.png)

4. 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](https://i.imgur.com/toKCgK0.png)

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

![aardvark service](https://i.imgur.com/aLp5ZQY.png)

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

![commit](https://i.imgur.com/ngc5hQv.png)

![changes](https://i.imgur.com/K0I1dao.png)

6. 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](https://i.imgur.com/2LpvADQ.png)

7. 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](http://i.imgur.com/zouC43q.png)

8. Create the pull request

![pull request create](https://i.imgur.com/dMvqH1b.png)

![finished request](http://i.imgur.com/MnFQNxd.png)

> At this point your instructor will accept the changes, refresh the page a few times.  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.