10. What is GitHub?
GitHub lets you upload all your project
files in one particular place for sharing
and collaboration
11. What is GitHub?
- Founded in 2008
- Web based version control and source
control management using git
- 31m users; 100m repositories
- Acquired by Microsoft on June 2018
for $7.5b
13. GitHub dictionary – Bare minimum
- “repository” – a.k.a repos are big chunks of
code that can be edited by GitHub members
- “clone” – make a copy/download
- “fork” – the term for code editing/changes
- “pull request” – intimation sent to the original
code writer requesting edit rights
More here: https://help.github.com/articles/github-glossary/
19. Create a new branch
- A branch is a snapshot of the
base branch (master in this
example) at a moment in time
- You can make changes to the
new branch without affecting
the base branch, until you
merge the branches
20. Create a README
- Created with Markdown
language (.md files)
- GitHub version called GitHub
Flavored Markdown
- Preview changes to see what
it looks like before committing
21. Commit changes to your GitHub repository
- You can commit your changes
from either panes
- Give a good description of
what you’ve done
- Go back to the top-level
repository to see your commit
shown.
22. Commit changes to your GitHub repository
- Switch back and forth
between the master
branch and your new
branch to see
README changes
and compare them
visually.
- Click on the commit
comment to open a
side-by-side source
code view
23. Open a pull request for your GitHub repo
- Submitting a PR is the way
you can contribute to
open source projects that
have a small number of
committers.
- When you make the
changes locally first,
committing to your local
repo and pushing to the
upstream repo (e.g. on
GitHub) are separate
steps.
24. Merge a pull request into your master
- On main repo page, click
the green “Compare &
pull request” button.
This time the exact pull
request you want to
submit will come up.
- When told that the
request has no conflicts,
press the green “Merge
pull request” button
25. Delete the merged branch
- Feel free to delete the
successfully merged
branch, using the button
to the right of the purple
icon.
- Consider adding a branch
every time you start
working on a feature, and
deleting the working
branch once it has been
successfully merged into a
production branch.
26. Clone a GitHub repo
- In real life people mostly
write code & docs on their
own machines, not online.
- Go to the code pane of the
repo and click on the green
“Clone or download” button.
- We don’t want to download
a Zip; instead, we want to
clone the repo with Git or
GitHub Desktop.
27. Fork a GitHub repo
- Search for popular repos from GitHub to contribute back.
- Fork is the way to contribute to someone else’s open source project.
- Once you’ve got a forked repo, not only can you treat it as your own, but
you can also apply later commits from the upstream repo from which you
created the fork, and submit pull requests back to the upstream repo.