Upload
matt-heusser
View
364
Download
0
Embed Size (px)
Citation preview
Contributing to GitHubIs For Everyone
Matthew HeusserChris Kenst
Spring OnlineTestConfJune 13, 2017
Introduction
Meta-Goal: Get you up and running on GitHub. Today. Serious.
Other Good Things and Side Benefits:
● Understand where configuration management comes from● Be able to speak to a developer about branching, pipeline, merging strategy● Have your own active GitHub account with meaningful commits tomorrow!
Watch and Learn● We’re going to teach you how to do this as we go along.● Here is what we recommend:
...
1. Watch us as we do the upcoming things2. Reply the video, step along with us, pausing to do the things we are talking
about
...
Ready?
Demo Time!Let’s do it first and explain it later.
Let’s Get it StartedPre-requisites
1. You’ll need to have git installed locallya. For Mac users, this comes installed with Xcode. Otherwise you can download itb. For Windows users, download and install it: https://git-scm.com/downloadsc. Set your Username and Email address within git: https://help.github.com/articles/set-up-git/
i. The Username and Email will need to match the one you used for GitHub.com
2. Install a Text Editora. We’ll be using Atom (also built by GitHub) but feel free to Sublime Text or one of your favoritesb. Download Atom: https://atom.io/
Creating our first Project
1. Go to GitHub.com and sign up for a free account 2. We'll create a repository through the Web interface
a. Starting on the login page, clicking the green "+ New Repository" button at the middle rightb. Name your repositoryc. Check the option for Initialize this repository with a READMEd. Click Create Repository buttone. Boom. Your repo has been created
3. Download your codea. Click the green “Clone or download button”b. Copy the url of your repoc. Switch to your command line and type `git clone + <url of repo>` and hit enter
4. Make an edita. Browse to your folder in the command lineb. Open an text editor within this repo (you can type `atom .` for mac to open Atom)c. Go to your README.md file and add some text description. Then save.
5. Confirm our changes & commit thema. Type `git status` (and press enter) to display a list of changesb. Type `git add .` to add all of our changes to the index. This prepares our files to be committedc. Type `git commit -m “description of change”` to commit the changed. Great, now we’re ready to push our changes up to GitHub
6. PUSH your local changesa. Type `git push origin <branch name>`
7. Confirm our changes are reflected on GitHub.com
Making changes to our Project with Branching
1. For each additional set of changes we’ll:a. Create a branch, b. make our changes, c. commit our changes and then push them up in this new
branch.
2. Within our existing repoa. Create a new branch `git checkout -b <branch name>`b. This will automatically create and place us within our new
branch (not on master)
3. Same workflow as before:a. Make an edit (see previous slide)b. Confirm our changes and commit themc. PUSH your local changes
4. Submit a Pull Requesta. Go to the Pull Request tab at the topb. Click the green “New pull request” buttonc. Set the base fork to master and the head fork to your branchd. Add some text to the changee. Create the Pull Request
5. Once the Pull Request is merged, your changes will be in!a. Merged to Master! (aka Production)
Contributing to an existing project
1. Go to GitHub.com and find a project that you have some interesting in helping2. Fork the repository
a. In the upper right corner, click Fork. This will bring a copy of the repo into your account
3. Repeat everything we’ve already done4. When you make your Pull Request
a. Set the base fork to the original repository and the head fork to your repository / branch5. Once the Pull Request is merged, you are in!
Version Control & Configuration MgmtThe WWII Tank Problem
More than code
● Checkout model● Gave way to commit● Gave way to push
Basic syntax:
git add file.txt
git commit file.txt
git push file.txt
What That Looks Like For Software
Why GitHub?● Free public hosting of code repositories that include many tools:
● Really nice for open source code / projects
● GitHub offers a way to be techincal beyond writing code
● Learn the development workflow
● GitHub is the new linkedin○ You are making a public portfolio
of work you can actually share○ You can follow and be followed by
fellow GitHub users○ Star other projects for later
Your Public Portfolio
GitHub for more than Code● GitHub is great for all those prior reasons● Once you understand the Git + GitHub workflow you can do so much more
than store code!● For example...
Run a Website● Jekyll based GitHub Pages● Free hosting & domain
Write a Book (or Documentation)● Write in GitHub● Stylize and publish with
GitBook
Create Lists● Lists are great for Data, Heuristics, Checklists, and more.● Data:
○ Images■ Catalog of images for Testing
○ Input Field values■ Big List of Naught Strings■ String, Integers, etc Lists
● Many lists turn into Lists of Lists...
Make Notes● Create notes to help
you remember things.● This note contains
guidelines on how to write exploratory testing charters ->
Help! What should I add?● Configuration files (sometimes called dotfiles) to your favorite editors,
terminals, etc.● Code or Markup Language
○ CSS files○ Blog Code○ Personal Projects (like Selenium Bootcamps, etc.)○ Classes you take where you’ve written code
● Documents○ Lists○ Images○ Articles○ GitBook
Filing Bugs: GitHub Issues● Don’t want to commit changes? File a bug on a project you enjoy (and follow)● Bug Reports are the tester’s primary work product
○ If you can write them well, you can use them as examples in your portfolio○ More importantly you can contribute by Testing a product
● GitHub Issues is a fully featured bug tracker with:○ Title, Summary and Comment Fields○ Assign Issues to team members○ Apply Labels○ Add to Projects○ Add to Milestones
● Exercise: Open an issue on the repo you created○ Either report a bug or create a task
Projects to Contribute To
● You want to contribute now but don’t know where to start?○ Best bet is to look around and star things you like. Then begin using them and contribute when
you find problems or can offer suggestions.
● TestingConferences.org○ This is a simple list of software testing conferences and workshops published collaboratively
with the testing community.
● Wordpress.com Desktop App● Babel, Node / NPM, Rails
○ Many of these projects have labels for first time submitters. Using these labels will get you better responses from the project’s members
More PleaseWebsites & Blogs powered by GitHub Pages:
● http://olivierlacan.com/● http://jonallured.com/● http://testingconferences.org/● More help creating a GitHub blog: https://pages.github.com/
Lists:
● 9 GitHub Lists for Testing● 18 GitHub Projects for Testing
More ContinuedCode:
● Practice using Selenium Now!
Other References:
● How to Get Started with GitHub
Final Thoughts & CommentsQuestions if we ran out of time? Go to Chris’s Ask Me Anything.
Get Stuck? Ask post-conference questions on The Creative Chaos Blog or on slack!