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
Composifying Your Not-Compose Code
kikoso
0
2
Guardrails and Sanity Checks: Verifying LLM Input and Output for Developers
kikoso
0
29
KMP_for_Swift.pdf
kikoso
0
52
Android Benchmarking and other stories
kikoso
0
280
KMP for Mobile Developers
kikoso
0
71
Diving into Coroutines
kikoso
1
75
K/N for mobile developers (including libraries' snippets)
kikoso
0
95
Kotlin/Native for Multiplatform development
kikoso
0
70
TensorFlow for Mobile Developers
kikoso
0
21
Other Decks in Technology
See All in Technology
Digitization部 紹介資料
sansan33
PRO
1
5.6k
Building a cloud native business on open source
lizrice
0
140
「改善」ってこれでいいんだっけ?
ukigmo_hiro
0
390
私のMCPの使い方
tsubakimoto_s
0
120
SCONE - 動画配信の帯域を最適化する新プロトコル
kazuho
1
300
Azureコストと向き合った、4年半のリアル / Four and a half years of dealing with Azure costs
aeonpeople
1
250
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
8.9k
HonoとJSXを使って管理画面をサクッと型安全に作ろう
diggymo
0
150
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
43k
混合雲環境整合異質工作流程工具運行關鍵業務 Job 的經驗分享
yaosiang
0
140
React19.2のuseEffectEventを追う
maguroalternative
2
580
コンパウンド組織のCRE #cre_meetup
layerx
PRO
0
160
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.5k
Music & Morning Musume
bryan
46
6.9k
4 Signs Your Business is Dying
shpigford
185
22k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
560
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
What's in a price? How to price your products and services
michaelherold
246
12k
Why Our Code Smells
bkeepers
PRO
340
57k
Thoughts on Productivity
jonyablonski
70
4.9k
KATA
mclloyd
PRO
32
15k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Producing Creativity
orderedlist
PRO
347
40k
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