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
200
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
35
Android Benchmarking and other stories
kikoso
0
120
KMP for Mobile Developers
kikoso
0
57
Diving into Coroutines
kikoso
1
60
K/N for mobile developers (including libraries' snippets)
kikoso
0
57
Kotlin/Native for Multiplatform development
kikoso
0
60
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
180
TensorFlow for Mobile Developers
kikoso
0
130
Other Decks in Technology
See All in Technology
LINEヤフーにおけるPrerender技術の導入とその効果
narirou
1
340
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
110
アプリエンジニアのためのGraphQL入門.pdf
spycwolf
0
120
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
29
13k
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
130
日経電子版のStoreKit2フルリニューアル
shimastripe
1
150
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
1
220
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
Storybook との上手な向き合い方を考える
re_taro
5
2k
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
190
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Site-Speed That Sticks
csswizardry
0
38
Building Your Own Lightsaber
phodgson
103
6.1k
Practical Orchestrator
shlominoach
186
10k
Music & Morning Musume
bryan
46
6.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
4 Signs Your Business is Dying
shpigford
180
21k
Fireside Chat
paigeccino
34
3k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
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