SlideShare a Scribd company logo
Git and GitHub crash Course
by Mireia Sangalo
@MyPitit
1. What is GitHub
2. What is Git
3. Diferences?
4. Git flow
1. Agenda
2. Agenda
GitHub
A walkthrough GitHub platform:
1. How to create an organisation
2. How to create a repository
3. Raising issues
4. Creating pull requests
5. Merging pull requests
6. Introduction to Wiki pages
Git
1. Clone a repository
2. Create / delete / change branch
3. Add / Push / Commit
4. Pull from master
3. Agenda
Let’s go!
1. What is GitHub
2. What is Git
3. Diferences?
4. Git flow
1. Agenda
1.1. What is GitHub?
• Web-based Git repository hosting service.
• It can be public or private, you can choose.
• If you want to create a private repositories you will
need to pay a small fee.
• If your repositories are public you can use the
service for free.
1. What is GitHub
2. What is Git
3. Diferences?
4. GitHub flow
1. Agenda
1. 2. What is Git?
Git is a free and open source distributed version control
system that is used for software development.
Git was initially designed and developed by Linus Torvalds for
Linux kernel development in 2005.
1. What is GitHub
2. What is Git
3. Diferences?
4. GitHub flow
1. Agenda
1. 3. Diferences
• GitHub is a Git repository hosting service.
• GitHub provides Web-based graphical interface.
• Git is a command line tool.
• With GitHub you can copy a repository from one user’s
account to another (fork).
You can send notifications (pull request).
You can merge the changes with one click.
1. What is GitHub
2. What is Git
3. Diferences?
4. GitHub flow
1. Agenda
1. 4. GitHub flow
Git and GitHub crash course
2. Agenda
GitHub
A walkthrough GitHub platform:
1. How to create an organisation
2. How to create a repository
3. Raising issues
4. Creating pull requests
5. Merging pull requests
6. Introduction to Wiki pages
7. README
2. 1. How to create an
organisation
2. Agenda
GitHub
A walkthrough GitHub platform:
1. How to create an organisation
2. How to create a repository
3. Raising issues
4. Creating pull requests
5. Merging pull requests
6. Introduction to Wiki pages
7. README
2. 2. How to create a
repository
2. Agenda
GitHub
A walkthrough GitHub platform:
1. How to create an organisation
2. How to create a repository
3. Raising issues
4. Creating pull requests
5. Merging pull requests
6. Introduction to Wiki pages
7. README
2. 3. Raising Issues
2. Agenda
GitHub
A walkthrough GitHub platform:
1. How to create an organisation
2. How to create a repository
3. Raising issues
4. Creating pull requests
5. Merging pull requests
6. Introduction to Wiki pages
7. README
2. 4. Creating a pull request
2. Agenda
GitHub
A walkthrough GitHub platform:
1. How to create an organisation
2. How to create a repository
3. Raising issues
4. Creating pull requests
5. Merging pull requests
6. Introduction to Wiki pages
7. README
2. 5. Merging a pull request
2. Agenda
GitHub
A walkthrough GitHub platform:
1. How to create an organisation
2. How to create a repository
3. Raising issues
4. Creating pull requests
5. Merging pull requests
6. Introduction to Wiki pages
7. README
2. 6. Wiki
2. Agenda
GitHub
A walkthrough GitHub platform:
1. How to create an organisation
2. How to create a repository
3. Raising issues
4. Creating pull requests
5. Merging pull requests
6. Introduction to Wiki pages
7. README
2. 7. README.md
Git and GitHub crash course
Git
1. Clone a repository
2. Create / delete / change branch
3. Add / Push / Commit
4. Pull from master
3. Agenda
3. 1. Clone a repository
$ git clone git@github.com:GitHubTutorialQUML/Tutorials.git
Cloning into 'Tutorials'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
Checking connectivity... done.
Git
1. Clone a repository
2. Create / delete / change branch
3. Add / Push / Commit
4. Pull from master
3. Agenda
Branches
Why do you need branches?
Git and GitHub crash course
3. 2. Create a new branch
$ git branch example
$ git branch
  example
* master
3. 2. Changing branches
$ git checkout example
Switched to branch 'example'
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
3. 2. Delete a branch
$ git branch -D example
Deleted branch example (was 5d0662d).
Git
1. Clone a repository
2. Create / delete / change branch
3. Add / Push / Commit
4. Pull from master
3. Agenda
3. 3. Add / Push / Commit
$ git add .
$ git commit -m "my 1st commit"
[example 5d0662d] my 1st commit
 1 file changed, 3 insertions(+), 1 deletion(-)
$ git push origin example
Counting objects: 3, done.
Writing objects: 100% (3/3), 271 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:GitHubTutorialQUML/Tutorials.git
 * [new branch]      example -> example
Everything was
perfect until one day…
Merge conflicts time!!
What is a merge conflict?
Git and GitHub crash course
Git
1. Clone a repository
2. Create / delete / change branch
3. Add / Push / Commit
4. Pull from master
3. Agenda
3. 4. Pull from master
mypitit@nietzsche: ~/Desktop/example/Tutorials $ git pull <remote>
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 7 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (7/7), done.
From ssh://my.remote.host.com/~/git/myproject
* branch master -> FETCH_HEAD
Updating 9d447d2..f74fb21
Fast forward
app/controllers/tutorials | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
Questions?

More Related Content

PPTX
Intro to Git and GitHub
Uri Goldstein
 
PPTX
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
PPTX
Introduction to Git and GitHub Part 1
Omar Fathy
 
PDF
Introduction to GitHub
Nishan Bose
 
PDF
Intro to Git and GitHub
Panagiotis Papadopoulos
 
PDF
Intro to Git, GitHub, and Devpost
Andrew Kerr
 
PDF
Git, GitHub and Open Source
Lorna Mitchell
 
PPTX
Introduction to github slideshare
Rakesh Sukumar
 
Intro to Git and GitHub
Uri Goldstein
 
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
Introduction to Git and GitHub Part 1
Omar Fathy
 
Introduction to GitHub
Nishan Bose
 
Intro to Git and GitHub
Panagiotis Papadopoulos
 
Intro to Git, GitHub, and Devpost
Andrew Kerr
 
Git, GitHub and Open Source
Lorna Mitchell
 
Introduction to github slideshare
Rakesh Sukumar
 

What's hot (19)

PPTX
Git tutorial
TingYen Lee
 
PDF
Learning git
Sid Anand
 
PPTX
Introduction to git & GitHub
Poornachandrakashi
 
PPTX
Git and Github Session
GoogleDevelopersStud1
 
PPTX
Git 101
Sachet Mittal
 
PDF
Git - An Introduction
Behzad Altaf
 
PPTX
Git 101 for Beginners
Anurag Upadhaya
 
PPTX
Github basics
Radoslav Georgiev
 
PPTX
Github
piyush khadse
 
PDF
Introduction to Git and Github
Houari ZEGAI
 
KEY
Introduction To Git
Arnaud Seilles
 
PDF
Git Started With Git
Nick Quaranto
 
PPTX
Github
MeetPatel710
 
PPT
Introduction to Git and Github
Somkiat Puisungnoen
 
PDF
Teaching a Designer to Use GitHub
Liam Dempsey
 
PPTX
Introduction to Git and GitHub Part 2
Omar Fathy
 
PDF
Git and github 101
Senthilkumar Gopal
 
PPTX
Workshop on Git and GitHub
DSCVSSUT
 
PDF
Github Case Study By Amil Ali
AmilAli1
 
Git tutorial
TingYen Lee
 
Learning git
Sid Anand
 
Introduction to git & GitHub
Poornachandrakashi
 
Git and Github Session
GoogleDevelopersStud1
 
Git 101
Sachet Mittal
 
Git - An Introduction
Behzad Altaf
 
Git 101 for Beginners
Anurag Upadhaya
 
Github basics
Radoslav Georgiev
 
Introduction to Git and Github
Houari ZEGAI
 
Introduction To Git
Arnaud Seilles
 
Git Started With Git
Nick Quaranto
 
Github
MeetPatel710
 
Introduction to Git and Github
Somkiat Puisungnoen
 
Teaching a Designer to Use GitHub
Liam Dempsey
 
Introduction to Git and GitHub Part 2
Omar Fathy
 
Git and github 101
Senthilkumar Gopal
 
Workshop on Git and GitHub
DSCVSSUT
 
Github Case Study By Amil Ali
AmilAli1
 
Ad

Similar to Git and GitHub crash course (20)

PPTX
Git and GitHub (1).pptx
BetelAddisu
 
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PPTX
tech winter break workshop on git &git hub.pptx
ashishraulin
 
PPTX
Git and GitHub workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PPTX
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
PDF
GDSC GIT AND GITHUB
GDSCIIITDHARWAD
 
PDF
GIT_GITHUB_2016_06_17
siva ram
 
PPTX
Git and GitHub Presentation of GDG on Campus UNSTPB
AmaraCostachiu
 
PPTX
Introduction to Git and Github
Md Atique Ahmed Ziad
 
PPTX
Get your Git on GitHub
Runcy Oommen
 
PDF
Git Hub Platform
Gaurav Ahluwalia
 
PPTX
Beginner's guide to git and github
SahilSonar4
 
PPTX
GitHub Event.pptx
KeerthanaJ32
 
PDF
RailsGirls Rotterdam - Github (and Octocats!)
Anton Bangratz
 
PDF
Introducing Github and Octocats by Tony Bangratz
RailsGirls_RTM
 
PDF
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
PPTX
Intro. to Git and Github
Olmo F. Maldonado
 
PDF
A Tutorial for GitHub.pdf
badrfathallah2
 
PDF
A Tutorial for GitHub.pdf
Amarnadh36
 
PDF
GDSC ZHCET GitHub Session.pdf
gdsczhcet
 
Git and GitHub (1).pptx
BetelAddisu
 
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
tech winter break workshop on git &git hub.pptx
ashishraulin
 
Git and GitHub workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
Git and GitHub Workshop of GDG on Campus UNSTPB
AmaraCostachiu
 
GDSC GIT AND GITHUB
GDSCIIITDHARWAD
 
GIT_GITHUB_2016_06_17
siva ram
 
Git and GitHub Presentation of GDG on Campus UNSTPB
AmaraCostachiu
 
Introduction to Git and Github
Md Atique Ahmed Ziad
 
Get your Git on GitHub
Runcy Oommen
 
Git Hub Platform
Gaurav Ahluwalia
 
Beginner's guide to git and github
SahilSonar4
 
GitHub Event.pptx
KeerthanaJ32
 
RailsGirls Rotterdam - Github (and Octocats!)
Anton Bangratz
 
Introducing Github and Octocats by Tony Bangratz
RailsGirls_RTM
 
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
Intro. to Git and Github
Olmo F. Maldonado
 
A Tutorial for GitHub.pdf
badrfathallah2
 
A Tutorial for GitHub.pdf
Amarnadh36
 
GDSC ZHCET GitHub Session.pdf
gdsczhcet
 
Ad

Recently uploaded (20)

PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PDF
Activated Carbon for Water and Wastewater Treatment_ Integration of Adsorptio...
EmilianoRodriguezTll
 
PPTX
EE3303-EM-I 25.7.25 electrical machines.pptx
Nagen87
 
PPTX
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
ghousebhasha2007
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PDF
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PDF
A Framework for Securing Personal Data Shared by Users on the Digital Platforms
ijcncjournal019
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
Traditional Exams vs Continuous Assessment in Boarding Schools.pdf
The Asian School
 
PDF
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
PDF
Introduction to Data Science: data science process
ShivarkarSandip
 
PDF
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
PPTX
Production of bioplastic from fruit peels.pptx
alwingeorgealwingeor
 
PPTX
Azure-DevOps-Training presentation downloadable
NamanGoyal428595
 
PPT
SCOPE_~1- technology of green house and poyhouse
bala464780
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PDF
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
PPT
Ppt for engineering students application on field effect
lakshmi.ec
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
Activated Carbon for Water and Wastewater Treatment_ Integration of Adsorptio...
EmilianoRodriguezTll
 
EE3303-EM-I 25.7.25 electrical machines.pptx
Nagen87
 
Unit 5 BSP.pptxytrrftyyydfyujfttyczcgvcd
ghousebhasha2007
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
A Framework for Securing Personal Data Shared by Users on the Digital Platforms
ijcncjournal019
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Traditional Exams vs Continuous Assessment in Boarding Schools.pdf
The Asian School
 
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
Introduction to Data Science: data science process
ShivarkarSandip
 
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
Production of bioplastic from fruit peels.pptx
alwingeorgealwingeor
 
Azure-DevOps-Training presentation downloadable
NamanGoyal428595
 
SCOPE_~1- technology of green house and poyhouse
bala464780
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
Ppt for engineering students application on field effect
lakshmi.ec
 

Git and GitHub crash course

  • 1. Git and GitHub crash Course by Mireia Sangalo @MyPitit
  • 2. 1. What is GitHub 2. What is Git 3. Diferences? 4. Git flow 1. Agenda
  • 3. 2. Agenda GitHub A walkthrough GitHub platform: 1. How to create an organisation 2. How to create a repository 3. Raising issues 4. Creating pull requests 5. Merging pull requests 6. Introduction to Wiki pages
  • 4. Git 1. Clone a repository 2. Create / delete / change branch 3. Add / Push / Commit 4. Pull from master 3. Agenda
  • 6. 1. What is GitHub 2. What is Git 3. Diferences? 4. Git flow 1. Agenda
  • 7. 1.1. What is GitHub? • Web-based Git repository hosting service. • It can be public or private, you can choose. • If you want to create a private repositories you will need to pay a small fee. • If your repositories are public you can use the service for free.
  • 8. 1. What is GitHub 2. What is Git 3. Diferences? 4. GitHub flow 1. Agenda
  • 9. 1. 2. What is Git? Git is a free and open source distributed version control system that is used for software development.
  • 10. Git was initially designed and developed by Linus Torvalds for Linux kernel development in 2005.
  • 11. 1. What is GitHub 2. What is Git 3. Diferences? 4. GitHub flow 1. Agenda
  • 13. • GitHub is a Git repository hosting service. • GitHub provides Web-based graphical interface. • Git is a command line tool. • With GitHub you can copy a repository from one user’s account to another (fork). You can send notifications (pull request). You can merge the changes with one click.
  • 14. 1. What is GitHub 2. What is Git 3. Diferences? 4. GitHub flow 1. Agenda
  • 15. 1. 4. GitHub flow
  • 17. 2. Agenda GitHub A walkthrough GitHub platform: 1. How to create an organisation 2. How to create a repository 3. Raising issues 4. Creating pull requests 5. Merging pull requests 6. Introduction to Wiki pages 7. README
  • 18. 2. 1. How to create an organisation
  • 19. 2. Agenda GitHub A walkthrough GitHub platform: 1. How to create an organisation 2. How to create a repository 3. Raising issues 4. Creating pull requests 5. Merging pull requests 6. Introduction to Wiki pages 7. README
  • 20. 2. 2. How to create a repository
  • 21. 2. Agenda GitHub A walkthrough GitHub platform: 1. How to create an organisation 2. How to create a repository 3. Raising issues 4. Creating pull requests 5. Merging pull requests 6. Introduction to Wiki pages 7. README
  • 22. 2. 3. Raising Issues
  • 23. 2. Agenda GitHub A walkthrough GitHub platform: 1. How to create an organisation 2. How to create a repository 3. Raising issues 4. Creating pull requests 5. Merging pull requests 6. Introduction to Wiki pages 7. README
  • 24. 2. 4. Creating a pull request
  • 25. 2. Agenda GitHub A walkthrough GitHub platform: 1. How to create an organisation 2. How to create a repository 3. Raising issues 4. Creating pull requests 5. Merging pull requests 6. Introduction to Wiki pages 7. README
  • 26. 2. 5. Merging a pull request
  • 27. 2. Agenda GitHub A walkthrough GitHub platform: 1. How to create an organisation 2. How to create a repository 3. Raising issues 4. Creating pull requests 5. Merging pull requests 6. Introduction to Wiki pages 7. README
  • 29. 2. Agenda GitHub A walkthrough GitHub platform: 1. How to create an organisation 2. How to create a repository 3. Raising issues 4. Creating pull requests 5. Merging pull requests 6. Introduction to Wiki pages 7. README
  • 32. Git 1. Clone a repository 2. Create / delete / change branch 3. Add / Push / Commit 4. Pull from master 3. Agenda
  • 33. 3. 1. Clone a repository $ git clone [email protected]:GitHubTutorialQUML/Tutorials.git Cloning into 'Tutorials'... remote: Counting objects: 3, done. remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 Receiving objects: 100% (3/3), done. Checking connectivity... done.
  • 34. Git 1. Clone a repository 2. Create / delete / change branch 3. Add / Push / Commit 4. Pull from master 3. Agenda
  • 35. Branches Why do you need branches?
  • 37. 3. 2. Create a new branch $ git branch example $ git branch   example * master
  • 38. 3. 2. Changing branches $ git checkout example Switched to branch 'example' $ git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'.
  • 39. 3. 2. Delete a branch $ git branch -D example Deleted branch example (was 5d0662d).
  • 40. Git 1. Clone a repository 2. Create / delete / change branch 3. Add / Push / Commit 4. Pull from master 3. Agenda
  • 41. 3. 3. Add / Push / Commit $ git add . $ git commit -m "my 1st commit" [example 5d0662d] my 1st commit  1 file changed, 3 insertions(+), 1 deletion(-) $ git push origin example Counting objects: 3, done. Writing objects: 100% (3/3), 271 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To [email protected]:GitHubTutorialQUML/Tutorials.git  * [new branch]      example -> example
  • 44. What is a merge conflict?
  • 46. Git 1. Clone a repository 2. Create / delete / change branch 3. Add / Push / Commit 4. Pull from master 3. Agenda
  • 47. 3. 4. Pull from master mypitit@nietzsche: ~/Desktop/example/Tutorials $ git pull <remote> remote: Counting objects: 11, done. remote: Compressing objects: 100% (5/5), done. remote: Total 7 (delta 2), reused 0 (delta 0) Unpacking objects: 100% (7/7), done. From ssh://my.remote.host.com/~/git/myproject * branch master -> FETCH_HEAD Updating 9d447d2..f74fb21 Fast forward app/controllers/tutorials | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)