Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Get Your Git On
Let me ask you some questions first
- Do you have any kind of coding project?
(It might be simple Java / C++ / Python etc…)
- Now, if someone asks you to share your code,
how will you do it?
Here’s your solution:
GitHub lets you upload all your project
files in one particular place for sharing
and collaboration
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
Image source: Wikipedia
Get your Git on GitHub
GitHub dictionary – Bare minimum
- “repository” – a.k.a repos are big chunks of
code that can be edited by GitHub members
- “forked” – 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/
More here: https://github.com
Set up a GitHub account
- Signup to create a username
and password and associate
them with your email
- Free account gives you the
opportunity to work on other
people’s projects and create
your own public repos.
- To create your own private
repos, you need to upgrade to a
paid subscription (unless a verified
student, teacher or academic researcher)
More here: https://desktop.github.com/
Install Git (GitHub Desktop)
- Easiest way to sync GitHub repos
and also install Git (Mac/Windows)
- Test for install
More here: https://git-scm.com/downloads
Install Git (git-scm.com)
- Download and run the
current Git installer for your
Operating System
- Test for install
More here: https://docs.microsoft.com/en-us/windows/wsl/about
Install Git (Windows subsystem for Linux)
- On Windows 10, install Git
in your Linux Bash shell
- Normal install with apt-get
Create a new repository on GitHub
Get your Git on GitHub
Get your Git on GitHub
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
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
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.
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
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.
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
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.
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.
- If you installed GitHub Desktop, click on “Open in Desktop.”
- Your GitHub Desktop would look something like the image below once
the clone finished:
- Click on the copy icon to the right of the URL for your repo and paste
the URL into a console after the command git clone
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.
Welcome to distributed
development with open source!
Get your Git on GitHub
Check it out: https://pages.github.com/
Check it out: https://gist.github.com/
Check it out: https://atom.io/
Check it out: https://guides.github.com/
Check it out: https://www.youtube.com/githubguides
Check it out: https://gource.io/
Check it out: https://probot.github.io/
Check it out: https://githubuniverse.com/
Runcy Oommen
runcyoommen
roommen
https://runcy.me
Get your Git on GitHub
Get your Git on GitHub

More Related Content

Get your Git on GitHub

  • 2. Let me ask you some questions first - Do you have any kind of coding project? (It might be simple Java / C++ / Python etc…) - Now, if someone asks you to share your code, how will you do it?
  • 3. Here’s your solution: GitHub lets you upload all your project files in one particular place for sharing and collaboration
  • 4. 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
  • 7. GitHub dictionary – Bare minimum - “repository” – a.k.a repos are big chunks of code that can be edited by GitHub members - “forked” – 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/
  • 8. More here: https://github.com Set up a GitHub account - Signup to create a username and password and associate them with your email - Free account gives you the opportunity to work on other people’s projects and create your own public repos. - To create your own private repos, you need to upgrade to a paid subscription (unless a verified student, teacher or academic researcher)
  • 9. More here: https://desktop.github.com/ Install Git (GitHub Desktop) - Easiest way to sync GitHub repos and also install Git (Mac/Windows) - Test for install
  • 10. More here: https://git-scm.com/downloads Install Git (git-scm.com) - Download and run the current Git installer for your Operating System - Test for install
  • 11. More here: https://docs.microsoft.com/en-us/windows/wsl/about Install Git (Windows subsystem for Linux) - On Windows 10, install Git in your Linux Bash shell - Normal install with apt-get
  • 12. Create a new repository on GitHub
  • 15. 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
  • 16. 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
  • 17. 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.
  • 18. 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
  • 19. 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.
  • 20. 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
  • 21. 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.
  • 22. 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.
  • 23. - If you installed GitHub Desktop, click on “Open in Desktop.” - Your GitHub Desktop would look something like the image below once the clone finished: - Click on the copy icon to the right of the URL for your repo and paste the URL into a console after the command git clone
  • 24. 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.
  • 27. Check it out: https://pages.github.com/
  • 28. Check it out: https://gist.github.com/
  • 29. Check it out: https://atom.io/
  • 30. Check it out: https://guides.github.com/
  • 31. Check it out: https://www.youtube.com/githubguides
  • 32. Check it out: https://gource.io/
  • 33. Check it out: https://probot.github.io/
  • 34. Check it out: https://githubuniverse.com/