Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Advanced Git
Search
Enrique López Mañas
December 03, 2014
Technology
5
210
Advanced Git
Talk at the #TechTalks at Sixt
Enrique López Mañas
December 03, 2014
Tweet
Share
More Decks by Enrique López Mañas
See All by Enrique López Mañas
KMP_for_Swift.pdf
kikoso
0
49
Android Benchmarking and other stories
kikoso
0
140
KMP for Mobile Developers
kikoso
0
70
Diving into Coroutines
kikoso
1
74
K/N for mobile developers (including libraries' snippets)
kikoso
0
93
Kotlin/Native for Multiplatform development
kikoso
0
68
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
190
TensorFlow for Mobile Developers
kikoso
0
160
Other Decks in Technology
See All in Technology
スプリントレトロスペクティブはチーム観察の宝庫? 〜チームの衝突レベルに合わせたアプローチ仮説!〜
electricsatie
1
150
実践アプリケーション設計 ③ドメイン駆動設計
recruitengineers
PRO
13
4.1k
7月のガバクラ利用料が高かったので調べてみた
techniczna
3
820
『FailNet~やらかし共有SNS~』エレベーターピッチ
yokomachi
1
200
データアナリストからアナリティクスエンジニアになった話
hiyokko_data
2
310
Agile PBL at New Grads Trainings
kawaguti
PRO
1
110
「魔法少女まどか☆マギカ Magia Exedra」での負荷試験の実践と学び
gree_tech
PRO
0
450
事業価値と Engineering
recruitengineers
PRO
8
5.4k
ガチな登山用デバイスからこんにちは
halka
1
200
役割は変わっても、変わらないもの 〜スクラムマスターからEMへの転身で学んだ信頼構築の本質〜 / How to build trust
shinop
0
160
ライブサービスゲームQAのパフォーマンス検証による品質改善の取り組み
gree_tech
PRO
0
430
サンドボックス技術でAI利活用を促進する
koh_naga
0
150
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
A Modern Web Designer's Workflow
chriscoyier
696
190k
Speed Design
sergeychernyshev
32
1.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
We Have a Design System, Now What?
morganepeng
53
7.8k
Typedesign – Prime Four
hannesfritz
42
2.8k
Site-Speed That Sticks
csswizardry
10
800
Transcript
Advanced Git München, 3.12.2014 Because there is life
behind pull and commit! Enrique López-‐Mañas
Index • Merging and rebasing • ReseGng, checking
out and reverJng • Advanced git log • Hooks
Merging and rebasing
Merge and rebasing git checkout feature git merge
master git merge master feature
Merge and rebasing
Merging and rebasing
Merge and rebasing git checkout feature git merge
master git merge master feature
Merge and rebasing git checkout feature git rebase
master
Merge and rebasing
Merge and rebasing InteracJve rebasing git checkout
feature git rebase -‐i master pick 33d5b7a Message for commit #1 pick 9480b3d Message for commit #2 pick 5c67e61 Message for commit #3 pick 33d5b7a Message for commit #1 fixup 9480b3d Message for commit #2 pick 5c67e61 Message for commit #3
Merge and rebasing InteracJve rebasing
Merge and rebasing Golden rule: not in public branches!
Merge and rebasing Upstream changes
Git reset
Git reset
Git reset
Git checkout git checkout hoYix
Git checkout
Git checkout git checkout HEAD~2
Git revert git checkout hoYix git revert HEAD~2
Git revert git checkout hoYix git revert HEAD~2
Git reset and revert • Reset: local branches
• Revert: public branches
More • Apply to files • git reset
HEAD~2 foo.py • git checkout HEAD~2 foo.py
Git log
Git log • git log -‐-‐oneline
Git log • git log -‐-‐decorate
Git log • git log -‐-‐stat
Git log • git log shortlog (for releases)
Git log • git log -‐-‐graph
Git hooks • In other technologies: trigger •
Six types: • pre-‐commit • prepare-‐commit-‐msg • post-‐commit • post-‐checkout • pre-‐rebase
Git hooks
Git hooks Installing hooks: • .git/hooks •
applypatch-‐msg.sample • pre-‐push.sample • commit-‐msg.sample • pre-‐rebase.sample • post-‐update.sample • prepare-‐commit-‐msg.sample • pre-‐applypatch.sample update.sample • pre-‐commit.sample
Git hooks Installing hooks: • .git/hooks •
applypatch-‐msg.sample • pre-‐push.sample • commit-‐msg.sample • pre-‐rebase.sample • post-‐update.sample • prepare-‐commit-‐msg.sample • pre-‐applypatch.sample update.sample • pre-‐commit.sample
Git hooks Prepare commit: #!/bin/sh
echo ”# Please include a useful commit message!" > $1
Git hooks #!/bin/sh echo ”# Please include
a useful commit message!" > $1
GitHooks ideas • Checking a reference to a library
is added • Checking message estructure • Rebasing or not rebasing • SeGng up an environment when there is a checkout • Change permissions
Thank you! • @eenriquelopez