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
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
42
KMP_for_Swift.pdf
kikoso
0
70
Android Benchmarking and other stories
kikoso
0
470
KMP for Mobile Developers
kikoso
0
88
Diving into Coroutines
kikoso
1
88
K/N for mobile developers (including libraries' snippets)
kikoso
0
120
Kotlin/Native for Multiplatform development
kikoso
0
82
TensorFlow for Mobile Developers
kikoso
0
21
Kotlin/Native for Multiplatform development
kikoso
1
200
Other Decks in Technology
See All in Technology
Gaussian Splattingの実用化 - 映像制作への展開
gpuunite_official
0
150
Claude Code / Codex / Kiro に AWS 権限を 渡すとき、何を設計すべきか
k_adachi_01
4
1.1k
Swift Sequence の便利 API 再発見
treastrain
1
260
クラウドネイティブ DB はいかにして制約を 克服したか? 〜進化歴史から紐解く、スケーラブルアーキテクチャ設計指針〜
hacomono
PRO
6
900
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
4
170
試作とデモンストレーション / Prototyping and Demonstrations
ks91
PRO
0
200
How to learn AWS Well-Architected with AWS BuilderCards: Security Edition
coosuke
PRO
0
120
Purview 勉強会報告 Microsoft Purview 入門しようとしてみた
masakichixo
1
350
React 19×Rustツール 進化の「ズレ」を設計で埋める
remrem0090
1
110
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
200
サービスの信頼性を高めるため、形骸化した「プロダクションミーティング」を立て直すまでの取り組み
stefafafan
1
260
エンタープライズの厳格な制約を開発者に意識させない:クラウドネイティブ開発基盤設計/cloudnative-kaigi-golden-path
mhrtech
0
400
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
920
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
It's Worth the Effort
3n
188
29k
Designing for humans not robots
tammielis
254
26k
Bash Introduction
62gerente
615
210k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
540
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
210
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Un-Boring Meetings
codingconduct
0
280
Thoughts on Productivity
jonyablonski
76
5.1k
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