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
Git & GitHub for Beginners
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
Git & GitHub for Beginners
Git & GitHub for Beginners
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
Git & GitHub for Beginners
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 (20)

PPTX
Git One Day Training Notes
glen_a_smith
 
PDF
git and github
Darren Oakley
 
PDF
Git basics
GHARSALLAH Mohamed
 
PPTX
Github basics
Radoslav Georgiev
 
PDF
Git and Github slides.pdf
Tilton2
 
PDF
Git - An Introduction
Behzad Altaf
 
PPT
Introduction to Git and Github
Somkiat Puisungnoen
 
PDF
Git and Github
Wen-Tien Chang
 
KEY
The everyday developer's guide to version control with Git
E Carter
 
PPTX
Introduction git
Dian Sigit Prastowo
 
KEY
Introduction To Git
Arnaud Seilles
 
PPTX
Git
Shinu Suresh
 
PDF
Techical Workflow for a Startup
Sébastien Saunier
 
PPT
Git basic
Emran Ul Hadi
 
PPTX
Git 101 for Beginners
Anurag Upadhaya
 
PPTX
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
PPTX
Git - Basic Crash Course
Nilay Binjola
 
PDF
Le Wagon - Web 101
Edward_Schults
 
PPTX
Git tutorial
Pham Quy (Jack)
 
PPTX
Understanding GIT and Version Control
Sourabh Sahu
 
Git One Day Training Notes
glen_a_smith
 
git and github
Darren Oakley
 
Git basics
GHARSALLAH Mohamed
 
Github basics
Radoslav Georgiev
 
Git and Github slides.pdf
Tilton2
 
Git - An Introduction
Behzad Altaf
 
Introduction to Git and Github
Somkiat Puisungnoen
 
Git and Github
Wen-Tien Chang
 
The everyday developer's guide to version control with Git
E Carter
 
Introduction git
Dian Sigit Prastowo
 
Introduction To Git
Arnaud Seilles
 
Techical Workflow for a Startup
Sébastien Saunier
 
Git basic
Emran Ul Hadi
 
Git 101 for Beginners
Anurag Upadhaya
 
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
Git - Basic Crash Course
Nilay Binjola
 
Le Wagon - Web 101
Edward_Schults
 
Git tutorial
Pham Quy (Jack)
 
Understanding GIT and Version Control
Sourabh Sahu
 

Viewers also liked (14)

PDF
Le Wagon On Demand - Behind the scenes
Sébastien Saunier
 
PDF
Building Layouts with CSS
Boris Paillard
 
PDF
Le wagon UI & design crash course
Mathieu Le Roux
 
PDF
Le Wagon - React 101
Sébastien Saunier
 
PDF
Le Wagon's Product Design Sprint
Boris Paillard
 
PDF
Le wagon Aix-Marseille - sketch
Louis Chavane
 
PDF
Le Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScript
Boris Paillard
 
PDF
Le Wagon - Product Specs 101
Boris Paillard
 
PDF
Le Wagon Brasil - Launching a Tech Product
Mathieu Le Roux
 
PDF
Le Wagon - Technical entrepreneurship
Boris Paillard
 
PDF
Le Wagon - UI and Design Crash Course
Boris Paillard
 
PDF
How Le Wagon uses Trello
Sébastien Saunier
 
PDF
Le wagon - JavaScript for beginners
Edward_Schults
 
Le Wagon On Demand - Behind the scenes
Sébastien Saunier
 
Building Layouts with CSS
Boris Paillard
 
Le wagon UI & design crash course
Mathieu Le Roux
 
Le Wagon - React 101
Sébastien Saunier
 
Le Wagon's Product Design Sprint
Boris Paillard
 
Le wagon Aix-Marseille - sketch
Louis Chavane
 
Le Wagon - Bootcamp in Ruby on Rails, HTML, CSS and JavaScript
Boris Paillard
 
Le Wagon - Product Specs 101
Boris Paillard
 
Le Wagon Brasil - Launching a Tech Product
Mathieu Le Roux
 
Le Wagon - Technical entrepreneurship
Boris Paillard
 
Le Wagon - UI and Design Crash Course
Boris Paillard
 
How Le Wagon uses Trello
Sébastien Saunier
 
Le wagon - JavaScript for beginners
Edward_Schults
 
Ad

Similar to Git & GitHub for Beginners (20)

PDF
Git & Github for beginners
Paulo Henrique Nonaka
 
PPTX
Git et github (1)
AndryRajohnson
 
DOCX
Git github
Anurag Deb
 
PPTX
Introduction To Git Workshop
themystic_ca
 
PDF
A Quick Start - Version Control with Git
Dmitry Sheiko
 
PPTX
Git learning
Amit Gupta
 
PPTX
Hacktoberfest intro to Git and GitHub
DSC GVP
 
PPT
390a gitintro 12au
Nguyen Van Hung
 
PPTX
Intro to Git DevOps Tally Presentation 101615
Brian K. Vagnini
 
PDF
Git and github 101
Senthilkumar Gopal
 
PPTX
Git and github introduction
John(Qiang) Zhang
 
PPT
Git introduction
satyendrajaladi
 
PDF
Git training
Jérémy Gobet
 
PPTX
Git and github
Teodora Ahkozidou
 
PPTX
Git and Github
Teodora Ahkozidou
 
PPTX
sample.pptx
UshaSuray
 
PDF
Learning git
Sid Anand
 
PDF
Git basics for beginners
PravallikaTammisetty
 
PPTX
Git&GitHub.pptx
KondiVenkatesh1
 
Git & Github for beginners
Paulo Henrique Nonaka
 
Git et github (1)
AndryRajohnson
 
Git github
Anurag Deb
 
Introduction To Git Workshop
themystic_ca
 
A Quick Start - Version Control with Git
Dmitry Sheiko
 
Git learning
Amit Gupta
 
Hacktoberfest intro to Git and GitHub
DSC GVP
 
390a gitintro 12au
Nguyen Van Hung
 
Intro to Git DevOps Tally Presentation 101615
Brian K. Vagnini
 
Git and github 101
Senthilkumar Gopal
 
Git and github introduction
John(Qiang) Zhang
 
Git introduction
satyendrajaladi
 
Git training
Jérémy Gobet
 
Git and github
Teodora Ahkozidou
 
Git and Github
Teodora Ahkozidou
 
sample.pptx
UshaSuray
 
Learning git
Sid Anand
 
Git basics for beginners
PravallikaTammisetty
 
Git&GitHub.pptx
KondiVenkatesh1
 
Ad

Git & GitHub for Beginners