Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Make Your First Contribution on GitHub

Make Your First Contribution on GitHub

This talk was presented at the Open Source Bridge conference on June 21st, 2016.

Interested in becoming a contributor to open source projects? In this talk, I'm going to show you the technical aspects involved in working with git and GitHub to prepare and submit contributions, and then working with project maintainers to get them merged.

Miguel Grinberg

June 21, 2016
Tweet

More Decks by Miguel Grinberg

Other Decks in Programming

Transcript

  1. Getting the code gremlin16/mortgage you/mortgage FORK git clone ~/mortgage $

    _ git clone https://github.com/ username/repo git config user.email your-email-address git remote add upstream https://github.com/ username/repo
  2. Making changes in a branch ~/mortgage my-feature-branch $ _ ~/mortgage

    my-feature-branch $ _ ~/mortgage master $ _ git checkout -b do some work git checkout -b feature-branch-name
  3. Saving your branch you/mortgage my-feature-branch ~/mortgage my-feature-branch $ _ ~/mortgage

    my-feature-branch $ _ git add/commit git push git add file(s) git commit -m " commit-message " git push origin feature-branch-name
  4. Syncing with upstream ~/mortgage master $ _ ~/mortgage master (stale)

    $ _ ~/mortgage my-feature-branch $ _ git checkout git pull git checkout master git pull upstream master
  5. Cleaning up local branches ~/mortgage master $ _ ~/mortgage master

    $ _ git branch -D git branch -D feature-branch-name
  6. Submitting a contribution v2 you/mortgage my-feature-branch gremlin16/mortgage pull request PULL

    REQUEST merge ~/mortgage my-feature-branch $ _ gremlin16/mortgage master review (s) git push $ _ ~/mortgage my-feature-branch git commit