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

Introduction to GitHub

Miguel Beltran
August 16, 2016
51

Introduction to GitHub

As part of the Android Study Jam for WTM Berlin in 2016

Miguel Beltran

August 16, 2016
Tweet

Transcript

  1. Why GitHub? Share code with others Build a portfolio Save

    your projects and course materials Social (?) network for developers
  2. Let’s Go! 1. What is it? 2. Using the App/Web

    3. Create your first project 4. Upload your code 5. Write an awesome README.md 6. Deal with conflicts PLEASE INTERRUPT ME WITH QUESTIONS
  3. Git? Version Control Tool used by GitHub (under the hood)

    - Collaboration - Store changes - Revert to older versions - Review changes - Code OK, but anything with text goes too!
  4. Repository? Storage Space for your Project - Create / Modify

    / Delete - Public or make private - Online (on Github) - Local (on your Computer)
  5. Create an Account (DEMO) 1. Go to GitHub.com a. Download

    the app meanwhile b. https://desktop.github.com/ 2. Show personal profile 3. Explain Repositories 4. Explain Contributions 5. Create a Repo on GitHub (to show the README.md later)
  6. Using the App (DEMO) 1. Open the App 2. Show

    the list of Repositories 3. Show existing Repository 4. Compare Web to App for same Repo
  7. Commit? Snapshot of your Changes - Contains code changes -

    You can checkout back to previous commits - You can revert a change in a commit - Contains a description - Can be viewed on GitHub - Need to be synchronized (pushed)
  8. Uploading an Android Project to GitHub (DEMO) 1.Open GitHub App

    2.Create repository from existing folder a. Add the project folder and not the folder before! 3.Commit all the contents 4.Synchronize 5.Show on GitHub 6.Make a change 7.Synchronize 8.Show on GitHub
  9. README.md Information about your Repo - Uses Markdown - Nice

    README = Nice Repo - Keep updated - Links, images even YouTube
  10. Editing the README.md (DEMO) 1. Go to GitHub 2. Go

    to newly created project 3. Create New File: README.md 4. Edit the README.md 5. Show different stylings: a. Headers b. Bold & Italics c. Links
  11. Conflicts? Same part of a file was changed in two

    different places - Needs to solve manually - “Merge” - Ugly part of version control tool
  12. Conflict solve (DEMO) 1. Edit README.md on GitHub.com (online) 2.

    Edit README.md on local 3. Synchronize local app 4. A wild conflict appears! 5. Fix conflict on local app 6. Proceed with sync
  13. Bottomline All your code should be on GitHub! - Nice

    portfolio - Hiring Managers love it - Follow other developers - Nice code storage - Conflicts are scary but fixable - It’s the most demanded skill - It’s free