SlideShare a Scribd company logo
1 of 13
Download to read offline
presents
IIIT Dharwad
GIT & GITHUB
DOCUMENTATION
GOOGLE DEVELOPER STUDENT CLUB
GITHUB ?
WHAT IS
&
Git is a version-control-system and GitHub is a cloud platform which
uses git to manage your codebase.
Let’s say you’ve added a new feature in your app and it breaks the
application for some reason. Now you want to go back in the past
and get access to the previous version of your code where the app is
running smoothly.
This can be done by using Git! Also collaborations can be achieved
via Git and GitHub :’)
Getting Started
repository - The folder where you store your all
code files
Stuck anywhere in a repo?
git status #-will show you the status of your
repository
Start with a git project from
scratch
initializes a git repo in the folder-
git init
commit your changes-
git add . # add files to the staging area
git commit -m "some commit message" # commit the changes to the version
git add?
it basically adds all of your specified files into a staging area where the changes can be
saved.
revert this step - remove added files to the staging area
git commit?
it takes a photo of all the staged files and add this snapshot/version in the history.
Start with a git project from
scratch
push to github?
using git stash stash the changes
git stash
this’ll put all the untracked and tracked changes to a stash area
get back stashed changes
git stash pop
will bring back the changes clear the stash
git stash clear
How to check all the versions
of your code?
log all the commits / versions
git log
to exit the log just type :q and hit enter
go to a specific commit in history
git revert commit_id
get the commit_id from git log
Getting started with Github
pip install
<requirement
r> [package-index-
ns] ...python -m
pip
all [options] -r
quirements file> [package-
x-options] ...python -m
[options] [-e] <vcs
thon -m
pip
local
ip
Getting Started with Github
initialize a repo (new)
here - https://github.com/new
link this github repo to your local git repo
get the git url
copy the url from the new repo or just grab the url from the chrome url box
link the repo
git remote add some_name url
some_name - the name to remote account accessing
url - the url you copied from get the git url
check all the remote repos attached
git remote -v
push the changes from your local to github
git push some_name branch_name
some_name - some_name - the name to remote account accessing
branch_name - the branch you are currently at
Git Branching
create a branch
git branch branch_name
go to a branch (branch_name)
git checkout branch_name
merge a branch
let’s say you have two branches - main and feature
you are in feature branch and you have to merge
feature in main
Git Branching
create a branch
git branch branch_name
go to a branch (branch_name)
git checkout branch_name
merge a branch
let’s say you have two branches - main and feature
you are in feature branch and you have to merge
feature in main
making a pull request (pr)
fork the repo from organization account to your account
docs - https://docs.github.com/en/get-started/quickstart/fork-a-repo clone your
repo locally git clone url
docs - https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-
repository
make a branch for pr
ref - create a branch with the feature name (it’s a convention)
commit and push your changes of the new branch to your account
commit changes - commit your changes
push to github - push the changes from your local to github
open github repo of your account and create a pr
docs - https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-
changes-to-your-work-with-pull-requests/creating-a-pull-request
To stand out
Make other’s life easy
Project title & description
Installation and run guides
How to understand / use the project
Credits / license
Badges
Contributing guidelines
Tests, if they exist
Why make a readme file / document your repo?
Makes a good impression of your project and account
things to include in a readme

More Related Content

What's hot

Gdsc Intro Session 2.0
Gdsc Intro Session 2.0Gdsc Intro Session 2.0
Gdsc Intro Session 2.0JasnaMarin2
 
Google Developer Student Clubs - Brand Guide & Event Kit for Leads (goo.gle_g...
Google Developer Student Clubs - Brand Guide & Event Kit for Leads (goo.gle_g...Google Developer Student Clubs - Brand Guide & Event Kit for Leads (goo.gle_g...
Google Developer Student Clubs - Brand Guide & Event Kit for Leads (goo.gle_g...Pawar Singh
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.skJuraj Hantak
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & GitCraig Smith
 
DSC GCOE, Nagpur intro session
DSC GCOE, Nagpur intro sessionDSC GCOE, Nagpur intro session
DSC GCOE, Nagpur intro sessionDSCGCOEN
 
Inauguration Session - Google DSC SNU
Inauguration Session - Google DSC SNUInauguration Session - Google DSC SNU
Inauguration Session - Google DSC SNUGDSCSNU
 
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀Wen-Tien Chang
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control SystemKMS Technology
 

What's hot (20)

Gdsc Intro Session 2.0
Gdsc Intro Session 2.0Gdsc Intro Session 2.0
Gdsc Intro Session 2.0
 
Google Developer Student Clubs - Brand Guide & Event Kit for Leads (goo.gle_g...
Google Developer Student Clubs - Brand Guide & Event Kit for Leads (goo.gle_g...Google Developer Student Clubs - Brand Guide & Event Kit for Leads (goo.gle_g...
Google Developer Student Clubs - Brand Guide & Event Kit for Leads (goo.gle_g...
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Git & git hub
Git & git hubGit & git hub
Git & git hub
 
Gitlab ci, cncf.sk
Gitlab ci, cncf.skGitlab ci, cncf.sk
Gitlab ci, cncf.sk
 
github-actions.pdf
github-actions.pdfgithub-actions.pdf
github-actions.pdf
 
Version Control & Git
Version Control & GitVersion Control & Git
Version Control & Git
 
Github
GithubGithub
Github
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
DSC GCOE, Nagpur intro session
DSC GCOE, Nagpur intro sessionDSC GCOE, Nagpur intro session
DSC GCOE, Nagpur intro session
 
Argocd up and running
Argocd up and runningArgocd up and running
Argocd up and running
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
Info Session slide
Info Session slideInfo Session slide
Info Session slide
 
Inauguration Session - Google DSC SNU
Inauguration Session - Google DSC SNUInauguration Session - Google DSC SNU
Inauguration Session - Google DSC SNU
 
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Introduction to gradle
Introduction to gradleIntroduction to gradle
Introduction to gradle
 

Similar to Git & GitHub Documentation for Beginners

Similar to Git & GitHub Documentation for Beginners (20)

Git
GitGit
Git
 
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
 
Git
GitGit
Git
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheet
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Version control git day03
Version control   git day03Version control   git day03
Version control git day03
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Git presentation
Git presentationGit presentation
Git presentation
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git Migration
 
Git
GitGit
Git
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer Cheatsheet
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
 
Introduction into Git
Introduction into GitIntroduction into Git
Introduction into Git
 
GWT Contributor Workshop
GWT Contributor WorkshopGWT Contributor Workshop
GWT Contributor Workshop
 

More from GDSCIIITDHARWAD

More from GDSCIIITDHARWAD (11)

GCCP-Session 2
GCCP-Session 2GCCP-Session 2
GCCP-Session 2
 
GCCP - Session #3
GCCP - Session #3GCCP - Session #3
GCCP - Session #3
 
Copy of Week #1
Copy of Week #1Copy of Week #1
Copy of Week #1
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Computer Vision.pptx
Computer Vision.pptxComputer Vision.pptx
Computer Vision.pptx
 
Firebase .pptx
Firebase .pptxFirebase .pptx
Firebase .pptx
 
Be the next Lead.pdf
Be the next Lead.pdfBe the next Lead.pdf
Be the next Lead.pdf
 
Flutter Forward Event .pptx
Flutter Forward Event .pptxFlutter Forward Event .pptx
Flutter Forward Event .pptx
 
web-dev-day2.pdf
web-dev-day2.pdfweb-dev-day2.pdf
web-dev-day2.pdf
 
web-dev-day2.pdf
web-dev-day2.pdfweb-dev-day2.pdf
web-dev-day2.pdf
 
Web Day-01.pptx
Web Day-01.pptxWeb Day-01.pptx
Web Day-01.pptx
 

Recently uploaded

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 

Recently uploaded (20)

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 

Git & GitHub Documentation for Beginners

  • 1. presents IIIT Dharwad GIT & GITHUB DOCUMENTATION GOOGLE DEVELOPER STUDENT CLUB
  • 3. Git is a version-control-system and GitHub is a cloud platform which uses git to manage your codebase. Let’s say you’ve added a new feature in your app and it breaks the application for some reason. Now you want to go back in the past and get access to the previous version of your code where the app is running smoothly. This can be done by using Git! Also collaborations can be achieved via Git and GitHub :’)
  • 4. Getting Started repository - The folder where you store your all code files Stuck anywhere in a repo? git status #-will show you the status of your repository
  • 5. Start with a git project from scratch initializes a git repo in the folder- git init commit your changes- git add . # add files to the staging area git commit -m "some commit message" # commit the changes to the version git add? it basically adds all of your specified files into a staging area where the changes can be saved. revert this step - remove added files to the staging area git commit? it takes a photo of all the staged files and add this snapshot/version in the history.
  • 6. Start with a git project from scratch push to github? using git stash stash the changes git stash this’ll put all the untracked and tracked changes to a stash area get back stashed changes git stash pop will bring back the changes clear the stash git stash clear
  • 7. How to check all the versions of your code? log all the commits / versions git log to exit the log just type :q and hit enter go to a specific commit in history git revert commit_id get the commit_id from git log
  • 8. Getting started with Github pip install <requirement r> [package-index- ns] ...python -m pip all [options] -r quirements file> [package- x-options] ...python -m [options] [-e] <vcs thon -m pip local ip
  • 9. Getting Started with Github initialize a repo (new) here - https://github.com/new link this github repo to your local git repo get the git url copy the url from the new repo or just grab the url from the chrome url box link the repo git remote add some_name url some_name - the name to remote account accessing url - the url you copied from get the git url check all the remote repos attached git remote -v push the changes from your local to github git push some_name branch_name some_name - some_name - the name to remote account accessing branch_name - the branch you are currently at
  • 10. Git Branching create a branch git branch branch_name go to a branch (branch_name) git checkout branch_name merge a branch let’s say you have two branches - main and feature you are in feature branch and you have to merge feature in main
  • 11. Git Branching create a branch git branch branch_name go to a branch (branch_name) git checkout branch_name merge a branch let’s say you have two branches - main and feature you are in feature branch and you have to merge feature in main
  • 12. making a pull request (pr) fork the repo from organization account to your account docs - https://docs.github.com/en/get-started/quickstart/fork-a-repo clone your repo locally git clone url docs - https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a- repository make a branch for pr ref - create a branch with the feature name (it’s a convention) commit and push your changes of the new branch to your account commit changes - commit your changes push to github - push the changes from your local to github open github repo of your account and create a pr docs - https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing- changes-to-your-work-with-pull-requests/creating-a-pull-request
  • 13. To stand out Make other’s life easy Project title & description Installation and run guides How to understand / use the project Credits / license Badges Contributing guidelines Tests, if they exist Why make a readme file / document your repo? Makes a good impression of your project and account things to include in a readme