SlideShare a Scribd company logo
1 of 42
Download to read offline
@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

What's hot (20)

Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git
GitGit
Git
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git basics
Git basicsGit basics
Git basics
 
Le Wagon - Javascript for Beginners
Le Wagon - Javascript for BeginnersLe Wagon - Javascript for Beginners
Le Wagon - Javascript for Beginners
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
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 Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
 
Grokking opensource with github
Grokking opensource with githubGrokking opensource with github
Grokking opensource with github
 
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 ...
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 

Viewers also liked

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 scenesSébastien Saunier
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSSBoris Paillard
 
Le Wagon - UI components design
Le Wagon - UI components designLe Wagon - UI components design
Le Wagon - UI components designBoris Paillard
 
Le wagon UI & design crash course
Le wagon UI & design crash courseLe wagon UI & design crash course
Le wagon UI & design crash courseMathieu Le Roux
 
Techical Workflow for a Startup
Techical Workflow for a StartupTechical Workflow for a Startup
Techical Workflow for a StartupSébastien Saunier
 
Le Wagon's Product Design Sprint
Le Wagon's Product Design SprintLe Wagon's Product Design Sprint
Le Wagon's Product Design SprintBoris Paillard
 
Le wagon Aix-Marseille - sketch
Le wagon Aix-Marseille  -   sketchLe wagon Aix-Marseille  -   sketch
Le wagon Aix-Marseille - sketchLouis 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 JavaScriptBoris Paillard
 
Le Wagon - Product Specs 101
Le Wagon - Product Specs 101Le Wagon - Product Specs 101
Le Wagon - Product Specs 101Boris 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 ProductMathieu Le Roux
 
Le Wagon - Technical entrepreneurship
Le Wagon - Technical entrepreneurshipLe Wagon - Technical entrepreneurship
Le Wagon - Technical entrepreneurshipBoris 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 CourseBoris Paillard
 
Le wagon - JavaScript for beginners
Le wagon - JavaScript for beginnersLe wagon - JavaScript for beginners
Le wagon - JavaScript for beginnersEdward_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

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
 
Learning git
Learning gitLearning git
Learning git
 
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
 

Git & GitHub for Beginners