Git

Robert MacLean
Robert MacLeanTech Lead at Equal Experts
Git
Hi
Robert
@rmaclean
sadev.co.za
devconf.co.za
developerug.org.za
What is Git?
Source control
Tool for sharing
Tool for learning
Tool to make experiments easy
A FREAKING TIME MACHINE
Going to show command line &
GUI
Git
What do we
have to
cover
1. Get Git
2. Config
3. Init Git
4. Status
5. Add file
6. Commit
7. Log
8. Undo
9. Diff
10. GitHub
11. Clone
12. Fork
13. Push & Pull
14. Pull Request
How to get Git
Download from: git-scm.com
Or from your favourite package
manager
Mac: $ brew install git
Debian: $ apt-get install git
Windows: $ winget install git
Or it is in your favourite
development tools 💕
Just text files
Name & email are the most (only)
important
$ git config --global user.name "John
Doe"
$ git config --global user.email
johndoe@example.com
Config
Init
Creates a new empty repo
Status
Shows you the status
Add
Files can be untracked, so this tells git to start tracking them
Git can then know if it modified or unmodified
Add tells git to both start tracking (if needed) and stage it
Staging means you can choose what to save each time
Tip: . = wildcard
Commit
Tells Git to save a copy of the work
Add a message to help you remember it
Log
Just look through your history
Can see the magic commit numbers
Undo
Restore an uncommit change (was also Reset before)
Reset is to rollback history
--hard undo rollback files vs. making files modified
Diff
See the differences…
Personally prefer gui tools for this
GitHub
Most important thing is this is an Octocat
GitHub
Central location for your code, documents…
anything
Can be private or public
Great for sharing
github.com/South-Africa-Government-
Procurement/Data-cleaning
Clone
Make a copy of the source
Sets a remote location too so you
can update later
Something you do very rarely
Internal work, used
External work, not used
Fork
Make a copy of a repository in
GitHub
Gives you a place you control
All part of GitHub
Pull & Push
Push upload
to server
Pull get from
server
Pull Request
Compare a fork to another repo
and make a difference
Create a document and allow the
owners of the other repo to accept
it
Way to send code from your place
of play, to others
Never forget 😎
1 of 21

Recommended

Building a µservice with Kotlin, Micronaut & GCP by
Building a µservice with Kotlin, Micronaut & GCPBuilding a µservice with Kotlin, Micronaut & GCP
Building a µservice with Kotlin, Micronaut & GCPRobert MacLean
4.8K views32 slides
GitHub Talk - Cody Carnachan by
GitHub Talk - Cody CarnachanGitHub Talk - Cody Carnachan
GitHub Talk - Cody CarnachanCody Carnachan
659 views35 slides
Intro to Git & GitHub by
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHubGoogleDevelopersStud
254 views33 slides
Gitlab meets Kubernetes by
Gitlab meets KubernetesGitlab meets Kubernetes
Gitlab meets Kubernetesinovex GmbH
537 views19 slides
Teaching a Designer to Use GitHub by
Teaching a Designer to Use GitHubTeaching a Designer to Use GitHub
Teaching a Designer to Use GitHubLiam Dempsey
3.1K views22 slides
Github by
GithubGithub
Githubpiyush khadse
1.1K views15 slides

More Related Content

What's hot

Git by
GitGit
Gitletourneauacm
637 views24 slides
Supercharge your app with Cloud Functions for Firebase by
Supercharge your app with Cloud Functions for FirebaseSupercharge your app with Cloud Functions for Firebase
Supercharge your app with Cloud Functions for FirebaseBret McGowen - NYC Google Developer Advocate
1.3K views38 slides
Building A Distributed Build System at Google Scale (StrangeLoop 2016) by
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Aysylu Greenberg
1.7K views64 slides
Git n git hub by
Git n git hubGit n git hub
Git n git hubJiwon Baek
524 views22 slides
Git Going w/ Git by
Git Going w/ GitGit Going w/ Git
Git Going w/ GitheyMP
1.1K views44 slides
GitHub Actions with Node.js by
GitHub Actions with Node.jsGitHub Actions with Node.js
GitHub Actions with Node.jsStefan Stölzle
598 views44 slides

What's hot(20)

Building A Distributed Build System at Google Scale (StrangeLoop 2016) by Aysylu Greenberg
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Aysylu Greenberg1.7K views
Git n git hub by Jiwon Baek
Git n git hubGit n git hub
Git n git hub
Jiwon Baek524 views
Git Going w/ Git by heyMP
Git Going w/ GitGit Going w/ Git
Git Going w/ Git
heyMP1.1K views
GitHub Actions demo with mabl by Bertold Kolics
GitHub Actions demo with mablGitHub Actions demo with mabl
GitHub Actions demo with mabl
Bertold Kolics135 views
Git and GitHub | Concept about Git and GitHub Process | Git Process overview by Rueful Robin
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
Rueful Robin399 views
How to use any static site generator with GitLab Pages. by Ivan Nemytchenko
How to use any static site generator with GitLab Pages. How to use any static site generator with GitLab Pages.
How to use any static site generator with GitLab Pages.
Ivan Nemytchenko945.1K views
Distributed systems in practice, in theory (JAX London) by Aysylu Greenberg
Distributed systems in practice, in theory (JAX London)Distributed systems in practice, in theory (JAX London)
Distributed systems in practice, in theory (JAX London)
Aysylu Greenberg762 views
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P... by inovex GmbH
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
Sprachsteuerung mit dem Google Assistant – Add a new User Interface to your P...
inovex GmbH805 views

Similar to Git

Beginner's guide to git and github by
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github SahilSonar4
120 views13 slides
Git presentation by
Git presentationGit presentation
Git presentationVikas Yaligar
1.8K views41 slides
introductiontogitandgithub-120702044048-phpapp01.pdf by
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfBruceLee275640
7 views23 slides
Introduction to git and github by
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
4.3K views23 slides
Getting started With GIT by
Getting started With GITGetting started With GIT
Getting started With GITGhadiAlGhosh
132 views21 slides
Git 101 Workshop by
Git 101 WorkshopGit 101 Workshop
Git 101 WorkshopJoy Seng
133 views37 slides

Similar to Git(20)

Beginner's guide to git and github by SahilSonar4
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github
SahilSonar4120 views
introductiontogitandgithub-120702044048-phpapp01.pdf by BruceLee275640
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
BruceLee2756407 views
Introduction to git and github by Aderemi Dadepo
Introduction to git and githubIntroduction to git and github
Introduction to git and github
Aderemi Dadepo4.3K views
Getting started With GIT by GhadiAlGhosh
Getting started With GITGetting started With GIT
Getting started With GIT
GhadiAlGhosh132 views
Git 101 Workshop by Joy Seng
Git 101 WorkshopGit 101 Workshop
Git 101 Workshop
Joy Seng133 views
Introduction to Git for Artists by David Newbury
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury4.4K views
Introduction to GitHub, Open Source and Tech Article by PRIYATHAMDARISI
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
PRIYATHAMDARISI224 views
Git single branch by Carl Brown
Git single branchGit single branch
Git single branch
Carl Brown1.3K views
Brief tutorial on Git by 聖文 鄭
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
聖文 鄭6.3K views

More from Robert MacLean

14 things you need to be a successful software developer (v3) by
14 things you need to be a successful software developer (v3)14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)Robert MacLean
97 views47 slides
OWASP TOP 10 by
OWASP TOP 10OWASP TOP 10
OWASP TOP 10Robert MacLean
890 views38 slides
Looking at the Vue by
Looking at the VueLooking at the Vue
Looking at the VueRobert MacLean
304 views43 slides
Kotlin 101 by
Kotlin 101Kotlin 101
Kotlin 101Robert MacLean
378 views15 slides
Features of Kotlin I find exciting by
Features of Kotlin I find excitingFeatures of Kotlin I find exciting
Features of Kotlin I find excitingRobert MacLean
4.1K views16 slides
JavaScript Gotchas by
JavaScript GotchasJavaScript Gotchas
JavaScript GotchasRobert MacLean
492 views29 slides

More from Robert MacLean(20)

14 things you need to be a successful software developer (v3) by Robert MacLean
14 things you need to be a successful software developer (v3)14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)
Robert MacLean97 views
Features of Kotlin I find exciting by Robert MacLean
Features of Kotlin I find excitingFeatures of Kotlin I find exciting
Features of Kotlin I find exciting
Robert MacLean4.1K views
The state of testing @ Microsoft by Robert MacLean
The state of testing @ MicrosoftThe state of testing @ Microsoft
The state of testing @ Microsoft
Robert MacLean12.1K views
Visual Studio ❤ JavaScript by Robert MacLean
Visual Studio ❤ JavaScriptVisual Studio ❤ JavaScript
Visual Studio ❤ JavaScript
Robert MacLean9.9K views
Putting the DOT in .NET - Dev/Ops/Test by Robert MacLean
Putting the DOT in .NET - Dev/Ops/TestPutting the DOT in .NET - Dev/Ops/Test
Putting the DOT in .NET - Dev/Ops/Test
Robert MacLean2K views
A Developer Day 2014 - Durban by Robert MacLean
A Developer Day 2014 - Durban A Developer Day 2014 - Durban
A Developer Day 2014 - Durban
Robert MacLean859 views
Agile lessons learned in the Microsoft ALM Rangers by Robert MacLean
Agile lessons learned in the Microsoft ALM RangersAgile lessons learned in the Microsoft ALM Rangers
Agile lessons learned in the Microsoft ALM Rangers
Robert MacLean885 views
Hour of code - Train the trainer by Robert MacLean
Hour of code - Train the trainerHour of code - Train the trainer
Hour of code - Train the trainer
Robert MacLean840 views
Building services for apps on a shoestring budget by Robert MacLean
Building services for apps on a shoestring budgetBuilding services for apps on a shoestring budget
Building services for apps on a shoestring budget
Robert MacLean560 views
3 things your app API is doing WRONG by Robert MacLean
3 things your app API is doing WRONG3 things your app API is doing WRONG
3 things your app API is doing WRONG
Robert MacLean602 views
How to build a Mobile API or HTML 5 app in 5 minutes by Robert MacLean
How to build a Mobile API or HTML 5 app in 5 minutesHow to build a Mobile API or HTML 5 app in 5 minutes
How to build a Mobile API or HTML 5 app in 5 minutes
Robert MacLean4K views
Protection of Personal Information Bill (POPI) by Robert MacLean
Protection of Personal Information Bill (POPI)Protection of Personal Information Bill (POPI)
Protection of Personal Information Bill (POPI)
Robert MacLean6.1K views

Recently uploaded

Future of Learning - Yap Aye Wee.pdf by
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdfNUS-ISS
38 views11 slides
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...NUS-ISS
15 views28 slides
Future of Learning - Khoong Chan Meng by
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan MengNUS-ISS
31 views7 slides
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...NUS-ISS
23 views70 slides
Throughput by
ThroughputThroughput
ThroughputMoisés Armani Ramírez
32 views11 slides
The details of description: Techniques, tips, and tangents on alternative tex... by
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...BookNet Canada
110 views24 slides

Recently uploaded(20)

Future of Learning - Yap Aye Wee.pdf by NUS-ISS
Future of Learning - Yap Aye Wee.pdfFuture of Learning - Yap Aye Wee.pdf
Future of Learning - Yap Aye Wee.pdf
NUS-ISS38 views
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by NUS-ISS
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
NUS-ISS15 views
Future of Learning - Khoong Chan Meng by NUS-ISS
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan Meng
NUS-ISS31 views
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS23 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada110 views
[2023] Putting the R! in R&D.pdf by Eleanor McHugh
[2023] Putting the R! in R&D.pdf[2023] Putting the R! in R&D.pdf
[2023] Putting the R! in R&D.pdf
Eleanor McHugh38 views
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV by Splunk
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
.conf Go 2023 - How KPN drives Customer Satisfaction on IPTV
Splunk86 views
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb12 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab11 views
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu... by NUS-ISS
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
NUS-ISS32 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price12 views
handbook for web 3 adoption.pdf by Liveplex
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdf
Liveplex19 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma17 views
Transcript: The Details of Description Techniques tips and tangents on altern... by BookNet Canada
Transcript: The Details of Description Techniques tips and tangents on altern...Transcript: The Details of Description Techniques tips and tangents on altern...
Transcript: The Details of Description Techniques tips and tangents on altern...
BookNet Canada119 views

Git