1 of 53

GitHub�Genius

Presented by the Open Source Software Team

July 18th, 8-9 PM Discord VC

Launch into the vast expanse of collaborative development, exploring new frontiers and innovating together!

Self link:

acmcsuf.com/github-genius-slidesRecording:

acmcsuf.com/github-genius-recording

A comprehensive guide to GitHub.

2 of 53

Recap

DM @Open Source Software for more information!

3 of 53

Make sure you selected the Open Source Software Role in #🆔get-roles

You will have access to all our channels

4 of 53

Today’s agenda

  • What is GitHub?
  • Git vs GitHub Desktop.
  • The maintainer’s perspective.
  • The contributor’s perspective.
  • What it takes to be a GitHub Genius (Interactive live demo!)
  • Pop quiz!

5 of 53

Glossary

  • Repository
  • Fork
  • Branch
  • Commit
  • Issue
  • Pull Request

6 of 53

What is GitHub

  • It’s a platform where people are able to create repositories to store their project code or contribute to other repositories.
  • When you make repos on github, you’re able to track your commit history if you want to look at your old code.
  • You can connect with other coders

7 of 53

What is a GitHub repository?

A repo, short for ‘repository’, is responsible for holding all your project’s code on GitHub. This way people can easily view your code

8 of 53

What is a Branch?

  • You can make a branch to write code that’s not on main. Any changes made won’t affect the main branch. It’s useful when multiple people are working on the same repository.
  • It’s good practice to have a descriptive name like fix/1980 if you’re solving a bug

9 of 53

What is a Fork?

Evan: “A fork is your own version of someone else’s repository.”

If you are not already a contributor, you cannot edit the repository directly, so you must make a fork.

10 of 53

What is a Commit?

Commits are…

11 of 53

What is a GitHub Issue?

Issues are…

12 of 53

What is a GitHub Pull Request?

Pull requests are…

Ex:

13 of 53

Maintainer’s perspective: New repo

Create new repository quick links:

  • repo.new
  • github.com/new

Note: The .gitignore file protects against leaking sensitive data.

14 of 53

Maintainer’s perspective: Initial commit

Create skeleton project, push code.

15 of 53

Contributor’s perspective: Clone

  • Clone and Fork repository.
  • When should I fork or just clone directly?
    • You need to fork repositories that you don’t have access to in order to contribute to them.
    • If you have contributor access to the repo, then you can straight up add branches. Suggestion: It more convenient to keep a Git repo up-to-date directly instead of via a fork.�

16 of 53

Contributor’s perspective: Fork

17 of 53

Contributor’s perspective: Fork

18 of 53

Contributor’s perspective: Fork

19 of 53

Contributor’s perspective: Fork

Before we continue, make sure you have git installed.

  • If you have github desktop, git is automatically installed already

20 of 53

Download Github Desktop

21 of 53

Contributor’s perspective: Clone

22 of 53

Contributor’s perspective: Clone

Clone on your first time setting up the project on this machine.

23 of 53

Contributor’s perspective: Contribute

Small change

24 of 53

Contributor’s perspective: Contribute

25 of 53

Contributor’s perspective: PR

Create a PR.

26 of 53

Contributor’s perspective: PR

Create a PR.

27 of 53

Contributor’s perspective: PR

Create a PR.

28 of 53

Contributor’s perspective: PR

Create a PR.

29 of 53

Contributor’s perspective: PR

Create a PR.

30 of 53

Contributor’s perspective: PR

Create a PR.

31 of 53

Contributor’s perspective: PR

Best practices.

32 of 53

Maintainer’s perspective

Review pull request.

33 of 53

Maintainer’s perspective

Review pull request.

34 of 53

Maintainer’s perspective

Review pull request.

35 of 53

Maintainer’s perspective

Review changes.

36 of 53

Maintainer’s perspective

Approve if it is looks good to you!

37 of 53

Maintainer’s perspective

Approve if it is looks good to you!

38 of 53

Maintainer’s perspective

Either maintainer or contributor can merge once maintainer approves changes!

39 of 53

Maintainer’s perspective

40 of 53

Maintainer’s perspective

41 of 53

Contributor’s perspective: Pull

Pull to make sure your local repository is up to date with the remote on GitHub each time you revisit the repository to make a new change.

42 of 53

GitHub Trivia

How to make a pretty readme to represent your personality?

Ex: 26samaahmed, tylermlui, EthanThatOneKid

  1. Start by creating a repo with the same name as your github username
  2. Create a README.md
    1. You can use markdown format

43 of 53

44 of 53

Resources for things to add to your profile:

45 of 53

GitHub Trivia

Learning more about how to read GitHub, such as how to motivate yourself with stats.

46 of 53

GitHub Trivia

How do you prevent merge conflicts.

47 of 53

More GitHub features

  • Readme files.
  • Choose a license.
  • Star lists.
  • Projects.
  • Actions/Workflows.
  • Issue/PR templates.
  • Discussions.
    • Example: Sitemap discussion
  • Codespaces.
  • More github.com/features…

48 of 53

Pop quiz

  • Can another pair of volunteers speedrun the process shown (time them).
  • Prize: Virtual high-five from Tyler.

49 of 53

Any questions?

Q/A

50 of 53

#100daysofdesign��https://100daysofdesign.etok.me

51 of 53

Thank you for attending! 💖

52 of 53

Attendance form

53 of 53

Next�week

Go Go Go!