SlideShare a Scribd company logo
1 of 37
Git
-Akshay
Overview
1. Install git and create a Github account
2.
3.
4.
5.
What is git?
How does git work?
What is GitHub?
Quick example using git and GitHub
Github icon
1 Install git and a create GitHub
account
Install git
• Linux (Debian)
- Command: sudo apt-get install git
• Linux (Fedora)
- Command: sudo yum install git
• Mac
- http://git-scm.com/download/mac
• Windows
- http://git-scm.com/download/win
Create Github account
•
•
www.github.com
Free for public repositories
What is version control?
• Asystem that keeps records of
your changes
Allows for collaborative
development
Allows you to know who
what changes and when
•
• made
• Allows you to revert any changes
and go back to a previous state
2 What is git?
What is version control?
• Distributed version control
Users keep entire code and•
history on their location
machines
• Users can make any changes
without internet access
• (Except pushing and pulling
changes from a remote server)
What is git?
•
•
Started in 2005
Created by Linus Torvald to aid
in Linuxkernel development
Git icon
What is git?
• Git isn’t
system
the only version control
• But (we think) it’s the best
3 How does git work?
How does git work?
• Can be complicated at first, but
there are a few key concepts
Important git terminology in
following :
•
Key Concepts:Snapshots
• The way git keeps track of your
history
code
• Essentially records what all your files
look like at a given point in time
You decide when to take a snapshot,
and of what files
Have the ability to go back to visit any
snapshot
Your snapshots from later on will stay
around, too
•
•
•
Key Concepts: Commit
•
•
The act of creating a snapshot
Can be a noun or verb
“I commited code”
“I just made a new commit”
•
•
• Essentially, a project is made
of a bunch of commits
up
Key Concepts: Commit
• Commits contain three pieces of
information:
1. Information about how the files
changed from previously
Areference to the commit
came before it
Called the “parent commit”
Ahash code name
2. that
•
3.
• Will look something like:
fb2d2ec5069fc6776c80b3ad6b7cbde3cade4e
Key Concepts: Repositories
•
•
Often shortened to ‘repo’
Acollection of all the files
the history of those files
• Consists of all your commits
and
• Place where all your hard work is
stored
Key Concepts: Repositories
• Can live on a local machine or
on a remote server (GitHub!)
The act of copying a repository
from a remote server is called
cloning
Cloning from a remote server
allows teams to work together
•
•
Key Concepts: Repositories
• The process of downloading
commits that don’t exist on your
machine from a remote repository
is called pulling changes
The process of adding your local
changes to the remote repository
is called pushing changes
•
Key Concepts: Branches
• All commits in git live on some
branch
• But there
branches
The main
can be many, many
• branch in a project is
called the master branch
So, what does a typical project look like?
• Abunch of commits linked
together that live on some branch,
contained in a repository
So, what does a typical project look like?
Time going forward
So, what is HEAD?
Time going forward
So, what is HEAD?
• Areference
commit
to the most recent
Time going forward
So, what is HEAD?
• Areference to the
commit
most recent
• (in most cases – not always true!)
Time going forward
So, what is
MASTER?
•
•
The main branch in your project
Doesn’t have to be called master, but almost
always is!
Time going forward
Key Concepts: Branching off of the master
branch
• The start of a branch points to
specific commit
When you want to make any
changes to your project you
make a new branch based on
commit
a
•
a
Key Concepts:
branch
Branching off of the master
Time going forward
aster
Key Concepts: Merging
• Once you’re done with your
feature, you merge it back into
Time going forward
Key Concepts: How do you make a commit
anyway?
• There are a lot of ‘states’ and ‘places’
a file can be
Local on your computer: the ‘working
directory’
When a file is ready to be put in a
commit you add it onto the ‘index’ or
‘staging’
•
•
• Staging is the new preferred term – but
you can see both ‘index’and ‘staging’
being used
Key Concepts: How do you make
anyway?
a commit
• The process:
•
•
Make some changes to a file
Use the ‘git add’ command to put
the file onto the staging
environment
Use the ‘git commit’ command to
create a new commit’
•
Key Concepts:
anyway?
How do you make a commit
Time going forward
Key Concepts:
anyway?
How do you make a commit
Time going forward
4 What is GitHub?
What is GitHub?
• www.github.com
• Largest web-based
hosting service
git repository
• Aka, hosts ‘remote repositories’
• Allows for code collaboration with
anyone online
Adds extra functionality on top of git•
• UI, documentation, bug tracking, feature
requests, pull requests, and more!
Octocat!
What is GitHub?
•
•
Founded in 2008
Also has an Enterprise
for businesses
edition
Octocat!
Additional Resources
Additional Resources
• Official git site and tutorial:
https://git-scm.com/
GitHub guides:
https://guides.github.com/
Command cheatsheet:
https://training.github.com/kit/
downloads/github-git-cheat-sheet.pdf
Interactive git tutorial:
https://try.github.io/levels/1/challenges/1
Visual/interactive cheatsheet:
http://ndpsoftware.com/git-cheatsheet.html
•
•
•
•

More Related Content

What's hot

Introduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsIntroduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsCarl Brown
 
Teaching a Designer to Use GitHub
Teaching a Designer to Use GitHubTeaching a Designer to Use GitHub
Teaching a Designer to Use GitHubLiam Dempsey
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With GitNick Quaranto
 
Gitgithub101slideshare 150922131830-lva1-app6891
Gitgithub101slideshare 150922131830-lva1-app6891Gitgithub101slideshare 150922131830-lva1-app6891
Gitgithub101slideshare 150922131830-lva1-app6891Brian Okinyi
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Omar Fathy
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash courseMireia Sangalo
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to gitEmanuele Olivetti
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHubUri Goldstein
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagramsDilum Navanjana
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial IIJim Yeh
 

What's hot (20)

Introduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsIntroduction to Git Commands and Concepts
Introduction to Git Commands and Concepts
 
Teaching a Designer to Use GitHub
Teaching a Designer to Use GitHubTeaching a Designer to Use GitHub
Teaching a Designer to Use GitHub
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Git 101
Git 101Git 101
Git 101
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Git101
Git101Git101
Git101
 
An Introduction to Git
An Introduction to GitAn Introduction to Git
An Introduction to Git
 
Gitgithub101slideshare 150922131830-lva1-app6891
Gitgithub101slideshare 150922131830-lva1-app6891Gitgithub101slideshare 150922131830-lva1-app6891
Gitgithub101slideshare 150922131830-lva1-app6891
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash course
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
 
Git training v10
Git training v10Git training v10
Git training v10
 
Git tutorial
Git tutorial Git tutorial
Git tutorial
 
Github
GithubGithub
Github
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial II
 

Similar to Git and Github

Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Ahmed El-Arabawy
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIsTim Osborn
 
O365Con18 - Git and GitHub - Rick van Rousselt
O365Con18 - Git and GitHub - Rick van RousseltO365Con18 - Git and GitHub - Rick van Rousselt
O365Con18 - Git and GitHub - Rick van RousseltNCCOMMS
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hubNaveen Pandey
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubKim Moir
 
Quick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHubQuick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHubAshoka R K T
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7Chris Caple
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITPouriaQashqai1
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Gitatishgoswami
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with GitThings Lab
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewRueful Robin
 
Git Introductive
Git IntroductiveGit Introductive
Git IntroductiveAdham Saad
 

Similar to Git and Github (20)

Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Git and github
Git and githubGit and github
Git and github
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
Demo
DemoDemo
Demo
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
O365Con18 - Git and GitHub - Rick van Rousselt
O365Con18 - Git and GitHub - Rick van RousseltO365Con18 - Git and GitHub - Rick van Rousselt
O365Con18 - Git and GitHub - Rick van Rousselt
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git
GitGit
Git
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Quick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHubQuick and easy way to get started with Git & GitHub
Quick and easy way to get started with Git & GitHub
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Git Introductive
Git IntroductiveGit Introductive
Git Introductive
 

More from Akshay Vasava

More from Akshay Vasava (7)

Moodle - E Learning
Moodle - E LearningMoodle - E Learning
Moodle - E Learning
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
WHONIX OS
WHONIX OSWHONIX OS
WHONIX OS
 
Touchless Touchscreen Technology
Touchless Touchscreen TechnologyTouchless Touchscreen Technology
Touchless Touchscreen Technology
 
N3XT
N3XTN3XT
N3XT
 
Mymanet
MymanetMymanet
Mymanet
 
3 D Internet
3 D Internet3 D Internet
3 D Internet
 

Recently uploaded

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 

Git and Github

  • 2. Overview 1. Install git and create a Github account 2. 3. 4. 5. What is git? How does git work? What is GitHub? Quick example using git and GitHub Github icon
  • 3. 1 Install git and a create GitHub account
  • 4. Install git • Linux (Debian) - Command: sudo apt-get install git • Linux (Fedora) - Command: sudo yum install git • Mac - http://git-scm.com/download/mac • Windows - http://git-scm.com/download/win
  • 6. What is version control? • Asystem that keeps records of your changes Allows for collaborative development Allows you to know who what changes and when • • made • Allows you to revert any changes and go back to a previous state
  • 7. 2 What is git?
  • 8. What is version control? • Distributed version control Users keep entire code and• history on their location machines • Users can make any changes without internet access • (Except pushing and pulling changes from a remote server)
  • 9. What is git? • • Started in 2005 Created by Linus Torvald to aid in Linuxkernel development Git icon
  • 10. What is git? • Git isn’t system the only version control • But (we think) it’s the best
  • 11. 3 How does git work?
  • 12. How does git work? • Can be complicated at first, but there are a few key concepts Important git terminology in following : •
  • 13. Key Concepts:Snapshots • The way git keeps track of your history code • Essentially records what all your files look like at a given point in time You decide when to take a snapshot, and of what files Have the ability to go back to visit any snapshot Your snapshots from later on will stay around, too • • •
  • 14. Key Concepts: Commit • • The act of creating a snapshot Can be a noun or verb “I commited code” “I just made a new commit” • • • Essentially, a project is made of a bunch of commits up
  • 15. Key Concepts: Commit • Commits contain three pieces of information: 1. Information about how the files changed from previously Areference to the commit came before it Called the “parent commit” Ahash code name 2. that • 3. • Will look something like: fb2d2ec5069fc6776c80b3ad6b7cbde3cade4e
  • 16. Key Concepts: Repositories • • Often shortened to ‘repo’ Acollection of all the files the history of those files • Consists of all your commits and • Place where all your hard work is stored
  • 17. Key Concepts: Repositories • Can live on a local machine or on a remote server (GitHub!) The act of copying a repository from a remote server is called cloning Cloning from a remote server allows teams to work together • •
  • 18. Key Concepts: Repositories • The process of downloading commits that don’t exist on your machine from a remote repository is called pulling changes The process of adding your local changes to the remote repository is called pushing changes •
  • 19. Key Concepts: Branches • All commits in git live on some branch • But there branches The main can be many, many • branch in a project is called the master branch
  • 20. So, what does a typical project look like? • Abunch of commits linked together that live on some branch, contained in a repository
  • 21. So, what does a typical project look like? Time going forward
  • 22. So, what is HEAD? Time going forward
  • 23. So, what is HEAD? • Areference commit to the most recent Time going forward
  • 24. So, what is HEAD? • Areference to the commit most recent • (in most cases – not always true!) Time going forward
  • 25. So, what is MASTER? • • The main branch in your project Doesn’t have to be called master, but almost always is! Time going forward
  • 26. Key Concepts: Branching off of the master branch • The start of a branch points to specific commit When you want to make any changes to your project you make a new branch based on commit a • a
  • 27. Key Concepts: branch Branching off of the master Time going forward
  • 28. aster Key Concepts: Merging • Once you’re done with your feature, you merge it back into Time going forward
  • 29. Key Concepts: How do you make a commit anyway? • There are a lot of ‘states’ and ‘places’ a file can be Local on your computer: the ‘working directory’ When a file is ready to be put in a commit you add it onto the ‘index’ or ‘staging’ • • • Staging is the new preferred term – but you can see both ‘index’and ‘staging’ being used
  • 30. Key Concepts: How do you make anyway? a commit • The process: • • Make some changes to a file Use the ‘git add’ command to put the file onto the staging environment Use the ‘git commit’ command to create a new commit’ •
  • 31. Key Concepts: anyway? How do you make a commit Time going forward
  • 32. Key Concepts: anyway? How do you make a commit Time going forward
  • 33. 4 What is GitHub?
  • 34. What is GitHub? • www.github.com • Largest web-based hosting service git repository • Aka, hosts ‘remote repositories’ • Allows for code collaboration with anyone online Adds extra functionality on top of git• • UI, documentation, bug tracking, feature requests, pull requests, and more! Octocat!
  • 35. What is GitHub? • • Founded in 2008 Also has an Enterprise for businesses edition Octocat!
  • 37. Additional Resources • Official git site and tutorial: https://git-scm.com/ GitHub guides: https://guides.github.com/ Command cheatsheet: https://training.github.com/kit/ downloads/github-git-cheat-sheet.pdf Interactive git tutorial: https://try.github.io/levels/1/challenges/1 Visual/interactive cheatsheet: http://ndpsoftware.com/git-cheatsheet.html • • • •