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
220
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Advanced Git
Talk at the #TechTalks at Sixt
Enrique López Mañas
December 03, 2014
More Decks by Enrique López Mañas
See All by Enrique López Mañas
Composifying Your Not-Compose Code
kikoso
0
51
KMP_for_Swift.pdf
kikoso
0
75
Android Benchmarking and other stories
kikoso
0
530
KMP for Mobile Developers
kikoso
0
96
Diving into Coroutines
kikoso
1
95
K/N for mobile developers (including libraries' snippets)
kikoso
0
120
Kotlin/Native for Multiplatform development
kikoso
0
87
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
210
Other Decks in Technology
See All in Technology
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
250
ラジオの科学
frievea
0
320
私がブラウザを自作したくなった理由
supurazako
1
240
ホームラボ紹介
y_sera15
0
180
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.3k
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
1
5.9k
Genie Codeハンズオン応用編
taka_aki
0
110
Genie Codeハンズオン基礎編
taka_aki
1
120
猫付きpingコマンドを自作
uyuki234
0
240
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.4k
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
260
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
260
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Visualization
eitanlees
152
17k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
170
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
490
Designing for Timeless Needs
cassininazir
1
440
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
410
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
AI: The stuff that nobody shows you
jnunemaker
PRO
9
910
A Tale of Four Properties
chriscoyier
163
24k
Building an army of robots
kneath
306
46k
Mobile First: as difficult as doing things right
swwweet
225
10k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
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