SlideShare a Scribd company logo
@ssaunier
git & GitHub
for Beginners
Knowledge worker
We create and edit documents (text, images, etc.)
Everyday workflow
1. Create a file
2. Save it
3. Edit it
4. Save it again
5. etc.
File life
Manual version control
Can we automate this?
For each document version, we need to know
1. When the file was modified
2. What changed
3. Why it was modified
There’s more, teams
Hence one more question
For each document version, we need to know
1. When the file was modified
2. What changed
3. Why it was modified
4. Who did the change
In a nutshell
We want a tool which
1. tracks document version
2. keeps an history of document changes
3. foster team work
Set up
Download & install git at http://git-scm.com/
Your identity
$ git config --global user.name "Sebastien Saunier”
$ git config --global user.email "seb@lewagon.org"
Basic commands
Starting
$ mkdir new_project
$ cd new_project
$ git init
Status
$ git status
git can tell you if your folder has some modified files (dirty)
Commit
2-steps process
# Select which file to add to the commit.
$ git add <file_1_which_has_been_modified>
$ git add <file_2_which_has_been_modified>
# Take a snapshot of what is in the staging area.
$ git commit --message "A meaningful message about this change"
Diff
If git status tells you something changed,
you can inspect exactly what changed:
$ git diff
$ git diff <a_specific_file_or_folder>
Log
Show commit history with
$ git log
Branching
One feature = One branch
Branch
$ git branch my-feature
Working in the Branch
$ git checkout my-feature
$ git commit (x2)
Merge
$ git checkout master
$ git diff master..my-feature
$ git merge --no-ff my-feature
Clean up
$ git branch -d my-feature
Start Over
Remote
We need a remote!
Go to GitHub, create a repo: https://github.com/new
$ git remote add origin https://github.com/<user>/<project>.git
Push
Share the code with your team, and the world
# Generic command
$ git push <remote> <branch>
# What we'll use
$ git push origin master
Pull
# Generic command
$ git pull <remote> <branch>
# What we'll use
$ git pull origin master
Github Desktop app
desktop.github.com
Profile page
Repository page
Commits & Branches
Pull requests
Issues
Forks
Open source contribution
Github pages
Hosting your website for free!
Repo example: lewagon/ui-components
Thank you!

More Related Content

What's hot

Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
glen_a_smith
 
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
 
Github
GithubGithub
Github
MeetPatel710
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Github basics
Github basicsGithub basics
Github basics
Radoslav Georgiev
 
Introduction git
Introduction gitIntroduction git
Introduction git
Dian Sigit Prastowo
 
Learning git
Learning gitLearning git
Learning git
Sid Anand
 
GitHub Presentation
GitHub PresentationGitHub Presentation
GitHub Presentation
BrianSchilder
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
 
Git training v10
Git training v10Git training v10
Git training v10
Skander Hamza
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
GoogleDevelopersStud1
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Md. Ahsan Habib Nayan
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
Git basics
Git basicsGit basics
Git basics
GHARSALLAH Mohamed
 

What's hot (20)

Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction 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
 
Github
GithubGithub
Github
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Github basics
Github basicsGithub basics
Github basics
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Learning git
Learning gitLearning git
Learning git
 
GitHub Presentation
GitHub PresentationGitHub Presentation
GitHub Presentation
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Git training v10
Git training v10Git training v10
Git training v10
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git
GitGit
Git
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Git basics
Git basicsGit basics
Git basics
 

Viewers also liked

Le Wagon - 2h Landing
Le Wagon - 2h LandingLe Wagon - 2h Landing
Le Wagon - 2h Landing
Boris Paillard
 
Le Wagon On Demand - Behind the scenes
Le Wagon On Demand - Behind the scenesLe Wagon On Demand - Behind the scenes
Le Wagon On Demand - Behind the scenes
Sébastien Saunier
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSS
Boris Paillard
 
Le Wagon - UI components design
Le Wagon - UI components designLe Wagon - UI components design
Le Wagon - UI components design
Boris Paillard
 
Le wagon UI & design crash course
Le wagon UI & design crash courseLe wagon UI & design crash course
Le wagon UI & design crash course
Mathieu Le Roux
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
Sébastien Saunier
 
Techical Workflow for a Startup
Techical Workflow for a StartupTechical Workflow for a Startup
Techical Workflow for a Startup
Sébastien Saunier
 
Le Wagon - Web 101
Le Wagon - Web 101Le Wagon - Web 101
Le Wagon - Web 101
Edward_Schults
 
Le Wagon - React 101
Le Wagon - React 101Le Wagon - React 101
Le Wagon - React 101
Sébastien Saunier
 
Le Wagon's Product Design Sprint
Le Wagon's Product Design SprintLe Wagon's Product Design Sprint
Le Wagon's Product Design Sprint
Boris Paillard
 
Le wagon Aix-Marseille - sketch
Le wagon Aix-Marseille  -   sketchLe wagon Aix-Marseille  -   sketch
Le wagon Aix-Marseille - sketch
Louis Chavane
 
Le Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScript
Le Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScriptLe Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScript
Le Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScript
Boris Paillard
 
Le Wagon - Product Specs 101
Le Wagon - Product Specs 101Le Wagon - Product Specs 101
Le Wagon - Product Specs 101
Boris Paillard
 
Le Wagon Brasil - Launching a Tech Product
Le Wagon Brasil - Launching a Tech ProductLe Wagon Brasil - Launching a Tech Product
Le Wagon Brasil - Launching a Tech Product
Mathieu Le Roux
 
Le Wagon - Technical entrepreneurship
Le Wagon - Technical entrepreneurshipLe Wagon - Technical entrepreneurship
Le Wagon - Technical entrepreneurship
Boris Paillard
 
Le Wagon - UI and Design Crash Course
Le Wagon - UI and Design Crash CourseLe Wagon - UI and Design Crash Course
Le Wagon - UI and Design Crash Course
Boris Paillard
 
How Le Wagon uses Trello
How Le Wagon uses TrelloHow Le Wagon uses Trello
How Le Wagon uses Trello
Sébastien Saunier
 
Le wagon - JavaScript for beginners
Le wagon - JavaScript for beginnersLe wagon - JavaScript for beginners
Le wagon - JavaScript for beginners
Edward_Schults
 

Viewers also liked (19)

Log
LogLog
Log
 
Le Wagon - 2h Landing
Le Wagon - 2h LandingLe Wagon - 2h Landing
Le Wagon - 2h Landing
 
Le Wagon On Demand - Behind the scenes
Le Wagon On Demand - Behind the scenesLe Wagon On Demand - Behind the scenes
Le Wagon On Demand - Behind the scenes
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSS
 
Le Wagon - UI components design
Le Wagon - UI components designLe Wagon - UI components design
Le Wagon - UI components design
 
Le wagon UI & design crash course
Le wagon UI & design crash courseLe wagon UI & design crash course
Le wagon UI & design crash course
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
Techical Workflow for a Startup
Techical Workflow for a StartupTechical Workflow for a Startup
Techical Workflow for a Startup
 
Le Wagon - Web 101
Le Wagon - Web 101Le Wagon - Web 101
Le Wagon - Web 101
 
Le Wagon - React 101
Le Wagon - React 101Le Wagon - React 101
Le Wagon - React 101
 
Le Wagon's Product Design Sprint
Le Wagon's Product Design SprintLe Wagon's Product Design Sprint
Le Wagon's Product Design Sprint
 
Le wagon Aix-Marseille - sketch
Le wagon Aix-Marseille  -   sketchLe wagon Aix-Marseille  -   sketch
Le wagon Aix-Marseille - sketch
 
Le Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScript
Le Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScriptLe Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScript
Le Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScript
 
Le Wagon - Product Specs 101
Le Wagon - Product Specs 101Le Wagon - Product Specs 101
Le Wagon - Product Specs 101
 
Le Wagon Brasil - Launching a Tech Product
Le Wagon Brasil - Launching a Tech ProductLe Wagon Brasil - Launching a Tech Product
Le Wagon Brasil - Launching a Tech Product
 
Le Wagon - Technical entrepreneurship
Le Wagon - Technical entrepreneurshipLe Wagon - Technical entrepreneurship
Le Wagon - Technical entrepreneurship
 
Le Wagon - UI and Design Crash Course
Le Wagon - UI and Design Crash CourseLe Wagon - UI and Design Crash Course
Le Wagon - UI and Design Crash Course
 
How Le Wagon uses Trello
How Le Wagon uses TrelloHow Le Wagon uses Trello
How Le Wagon uses Trello
 
Le wagon - JavaScript for beginners
Le wagon - JavaScript for beginnersLe wagon - JavaScript for beginners
Le wagon - JavaScript for beginners
 

Similar to Git & GitHub for Beginners

Git & Github for beginners
Git & Github for beginnersGit & Github for beginners
Git & Github for beginners
Paulo Henrique Nonaka
 
Git et github (1)
Git et github (1)Git et github (1)
Git et github (1)
AndryRajohnson
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
themystic_ca
 
A Quick Start - Version Control with Git
A Quick Start - Version Control with GitA Quick Start - Version Control with Git
A Quick Start - Version Control with Git
Dmitry Sheiko
 
Git learning
Git learningGit learning
Git learning
Amit Gupta
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
DSC GVP
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
Nguyen Van Hung
 
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 101615Brian K. Vagnini
 
Git and github introduction
Git and github introductionGit and github introduction
Git and github introduction
John(Qiang) Zhang
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Git training
Git trainingGit training
Git training
Jérémy Gobet
 
Git and github
Git and githubGit and github
Git and github
Teodora Ahkozidou
 
Git and Github
Git and GithubGit and Github
Git and Github
Teodora Ahkozidou
 
Git
GitGit
sample.pptx
sample.pptxsample.pptx
sample.pptx
UshaSuray
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
PravallikaTammisetty
 
Git&GitHub.pptx
Git&GitHub.pptxGit&GitHub.pptx
Git&GitHub.pptx
KondiVenkatesh1
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
Prakash Dantuluri
 

Similar to Git & GitHub for Beginners (20)

Git & Github for beginners
Git & Github for beginnersGit & Github for beginners
Git & Github for beginners
 
Git et github (1)
Git et github (1)Git et github (1)
Git et github (1)
 
Git github
Git githubGit github
Git github
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 
A Quick Start - Version Control with Git
A Quick Start - Version Control with GitA Quick Start - Version Control with Git
A Quick Start - Version Control with Git
 
Git learning
Git learningGit learning
Git learning
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
 
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 and github introduction
Git and github introductionGit and github introduction
Git and github introduction
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git training
Git trainingGit training
Git training
 
Git and github
Git and githubGit and github
Git and github
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git
GitGit
Git
 
sample.pptx
sample.pptxsample.pptx
sample.pptx
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
 
Git&GitHub.pptx
Git&GitHub.pptxGit&GitHub.pptx
Git&GitHub.pptx
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 

Git & GitHub for Beginners