SlideShare a Scribd company logo
+
By Luis Lamadrid
But first…
A distributed version control system with
an emphasis on speed, data integrity, and
support for distributed, non-linear workflows.
Oversimplified: A collection of text files
that track the changes within your own
collection of text files.
folder_name $ git init
Working 

Directory
Three essential parts of git
Staging

Area
Local

Repository
(backstage) (on stage) (snapshot)
1 32
Branches
A lightweight movable pointer to one of the
commits. The default branch name in Git is
master.
Graphical Branches
master
x_branch
time
mergecommit
branch
creation
Most Useful Commands
$ git init
$ git add .
$ git commit -m “Message”
$ git checkout [-b] branch_name or commit_hash
To initialize a repository:
To add all files to staging area:
To add staged files to local repository
To [change / create] branch or go back to previous version:
$ git merge br1 br2
To combine two branches:
$ git status
To check the status of the repo:
Working Directory
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
comments.txt
cpp_code.cpp
ruby_code.rb
nothing added to commit but untracked files present (use "git add" to
track)
1
Staging Area
$ git add .
$ git status
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: comments.txt
new file: cpp_code.cpp
new file: ruby_code.rb
2
Local Repository
$ git commit -m "My First Commit"
[master (root-commit) 1e74cf1] My First Commit
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 comments.txt
create mode 100644 cpp_code.cpp
create mode 100644 ruby_code.rb
(master) $ git status
On branch master
nothing to commit, working directory clean
3
Now…GitHub!
A web-based Git repository hosting service,
which offers all of the distributed revision control
and source code management (SCM) functionality
of Git as well as adding its own features.
Oversimplified: A connection between you and
your teammates (cloud server).
Connecting Your Local
Repository To GitHub
$ git remote add origin https://github.com/Username/Repo.git
$ git push [-u] origin master [or branch_name]
To add a remote:
To push the changes to the newly created repo:
Most Useful Commands
$ git push origin [-u] branch_name
$ git pull origin branch_name
To upload your changes to GitHub:
To download your team’s changes:
Demo!
Thanks!
+

More Related Content

What's hot

Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
vartmp
 
Git vs svn
Git vs svnGit vs svn
Git vs svn
Suman Mukherjee
 
Git, Beginner to Advanced Survey
Git, Beginner to Advanced SurveyGit, Beginner to Advanced Survey
Git, Beginner to Advanced Survey
Rafal Rusin
 
Git
GitGit
Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
Sothearin Ren
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
Aditya Tiwari
 
Git
GitGit
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Augusto Gabriel Luna Bardales
 
Exprimiendo GIT
Exprimiendo GITExprimiendo GIT
Exprimiendo GIT
betabeers
 
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615
Brian K. Vagnini
 
Git cheat-sheet-education
Git cheat-sheet-educationGit cheat-sheet-education
Git cheat-sheet-education
Avitesh Kesharwani
 
test
testtest
test
zwned
 
Git
GitGit
Git
GitGit
Git
GitGit

What's hot (15)

Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
 
Git vs svn
Git vs svnGit vs svn
Git vs svn
 
Git, Beginner to Advanced Survey
Git, Beginner to Advanced SurveyGit, Beginner to Advanced Survey
Git, Beginner to Advanced Survey
 
Git
GitGit
Git
 
Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Git
GitGit
Git
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
 
Exprimiendo GIT
Exprimiendo GITExprimiendo GIT
Exprimiendo GIT
 
Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615Intro to Git DevOps Tally Presentation 101615
Intro to Git DevOps Tally Presentation 101615
 
Git cheat-sheet-education
Git cheat-sheet-educationGit cheat-sheet-education
Git cheat-sheet-education
 
test
testtest
test
 
Git
GitGit
Git
 
Git
GitGit
Git
 
Git
GitGit
Git
 

Similar to HackMTY - GitHub Workshop

Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
 
Git github
Git githubGit github
Git github
Anurag Deb
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
Nguyen Van Hung
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
Automat-IT
 
Git training
Git trainingGit training
Git training
eric7master
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
Git101
Git101Git101
Git101
Jens Segers
 
sample.pptx
sample.pptxsample.pptx
sample.pptx
UshaSuray
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
簡單介紹git
簡單介紹git簡單介紹git
簡單介紹git
Grace Chien
 
Git basic
Git basicGit basic
Git basic
Akbar Uddin
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
Marco De Stefano
 
Git for developers
Git for developersGit for developers
Git for developers
Hacen Dadda
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
PravallikaTammisetty
 
Git
GitGit
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
Contributing to Open Source with GitHub GDSC
Contributing to Open Source with GitHub GDSCContributing to Open Source with GitHub GDSC
Contributing to Open Source with GitHub GDSC
AyanMasood1
 
GIT_In_90_Minutes
GIT_In_90_MinutesGIT_In_90_Minutes
GIT_In_90_Minutes
vimukthirandika
 
Learning Basic GIT Cmd
Learning Basic GIT CmdLearning Basic GIT Cmd
Learning Basic GIT Cmd
srinathcox
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 

Similar to HackMTY - GitHub Workshop (20)

Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Git github
Git githubGit github
Git github
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
 
Git training
Git trainingGit training
Git training
 
Collaborative development with Git | Workshop
Collaborative development with Git | WorkshopCollaborative development with Git | Workshop
Collaborative development with Git | Workshop
 
Git101
Git101Git101
Git101
 
sample.pptx
sample.pptxsample.pptx
sample.pptx
 
Git introduction
Git introductionGit introduction
Git introduction
 
簡單介紹git
簡單介紹git簡單介紹git
簡單介紹git
 
Git basic
Git basicGit basic
Git basic
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
 
Git for developers
Git for developersGit for developers
Git for developers
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
 
Git
GitGit
Git
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
 
Contributing to Open Source with GitHub GDSC
Contributing to Open Source with GitHub GDSCContributing to Open Source with GitHub GDSC
Contributing to Open Source with GitHub GDSC
 
GIT_In_90_Minutes
GIT_In_90_MinutesGIT_In_90_Minutes
GIT_In_90_Minutes
 
Learning Basic GIT Cmd
Learning Basic GIT CmdLearning Basic GIT Cmd
Learning Basic GIT Cmd
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
 

Recently uploaded

Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 

Recently uploaded (20)

Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 

HackMTY - GitHub Workshop

  • 3. A distributed version control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows.
  • 4. Oversimplified: A collection of text files that track the changes within your own collection of text files. folder_name $ git init
  • 5. Working 
 Directory Three essential parts of git Staging
 Area Local
 Repository (backstage) (on stage) (snapshot) 1 32
  • 6.
  • 7. Branches A lightweight movable pointer to one of the commits. The default branch name in Git is master.
  • 9. Most Useful Commands $ git init $ git add . $ git commit -m “Message” $ git checkout [-b] branch_name or commit_hash To initialize a repository: To add all files to staging area: To add staged files to local repository To [change / create] branch or go back to previous version: $ git merge br1 br2 To combine two branches: $ git status To check the status of the repo:
  • 10. Working Directory $ git status On branch master Initial commit Untracked files: (use "git add <file>..." to include in what will be committed) comments.txt cpp_code.cpp ruby_code.rb nothing added to commit but untracked files present (use "git add" to track) 1
  • 11. Staging Area $ git add . $ git status On branch master Initial commit Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: comments.txt new file: cpp_code.cpp new file: ruby_code.rb 2
  • 12. Local Repository $ git commit -m "My First Commit" [master (root-commit) 1e74cf1] My First Commit 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 comments.txt create mode 100644 cpp_code.cpp create mode 100644 ruby_code.rb (master) $ git status On branch master nothing to commit, working directory clean 3
  • 14. A web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.
  • 15. Oversimplified: A connection between you and your teammates (cloud server).
  • 16. Connecting Your Local Repository To GitHub $ git remote add origin https://github.com/Username/Repo.git $ git push [-u] origin master [or branch_name] To add a remote: To push the changes to the newly created repo:
  • 17. Most Useful Commands $ git push origin [-u] branch_name $ git pull origin branch_name To upload your changes to GitHub: To download your team’s changes:
  • 18. Demo!