git in 5 slides
(advanced)
git how to work with branch
a branch is parallel development

HEB-ÉSI · Pierre Bettens (pbt) · 2 / 9
basic use
default branch is master
echo "I'm the best" > file
git init
git add .
git commit -m "First commit"

HEB-ÉSI · P...
basic use
create other branch called chief
git checkout -b chief
echo "Chief is better than me" > file
git commit -a -m "C...
basic use
merge modifications
git merge <branch>

pull

≠ fetch
= fetch + merge

HEB-ÉSI · Pierre Bettens (pbt) · 5 / 9
standard workflow
workflow
work on sprint_i+1 …
… when sprint_i must be validated
sprint_i is master
git checkout -b sprint_i+1
… // sprint_...
I fail !
amend when you fail
change commit message

git commit --amend
add file with 'git add' and commit

git commit --am...
This slides are part of 5slides serie
« 5slides – how to present a concept in 5 slides »

Credits
gitmagic by Ben Lynn fr ...
Upcoming SlideShare
Loading in …5
×

git (advanced) in 5 slides

477 views

Published on

I try to present a conccept in 5 slides …

… today git (advanced)

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
477
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

git (advanced) in 5 slides

  1. 1. git in 5 slides (advanced)
  2. 2. git how to work with branch a branch is parallel development HEB-ÉSI · Pierre Bettens (pbt) · 2 / 9
  3. 3. basic use default branch is master echo "I'm the best" > file git init git add . git commit -m "First commit" HEB-ÉSI · Pierre Bettens (pbt) · 3 / 9
  4. 4. basic use create other branch called chief git checkout -b chief echo "Chief is better than me" > file git commit -a -m "Chief commit" git checkout < master | chief > HEB-ÉSI · Pierre Bettens (pbt) · 4 / 9
  5. 5. basic use merge modifications git merge <branch> pull ≠ fetch = fetch + merge HEB-ÉSI · Pierre Bettens (pbt) · 5 / 9
  6. 6. standard workflow
  7. 7. workflow work on sprint_i+1 … … when sprint_i must be validated sprint_i is master git checkout -b sprint_i+1 … // sprint_i validated git checkout master git merge sprint_i+1 git branch -d sprint_i+1
  8. 8. I fail ! amend when you fail change commit message git commit --amend add file with 'git add' and commit git commit --amend -a blame show change history for a file and say who fail
  9. 9. This slides are part of 5slides serie « 5slides – how to present a concept in 5 slides » Credits gitmagic by Ben Lynn fr en Who am I ? Pierre Bettens (pbt) – http://blog.namok.be Images and icons The noun project; Joe Harrisson, Juan Pablo Bravo, Mert Gutav DeviantArt; Navanna Flickr; Richard Cuisset

×