Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Git - Monterail style
Tymon Tobolski
July 01, 2015
Programming
1
70
Git - Monterail style
Tymon Tobolski
July 01, 2015
Tweet
Share
More Decks by Tymon Tobolski
See All by Tymon Tobolski
Only possible with Elixir - ubots Case Study
teamon
0
100
Fun with Elixir Macros
teamon
1
320
Elixir GenStage & Flow
teamon
2
700
Elixir - Bydgoszcz Web Development Meetup
teamon
2
480
Sidekiq
teamon
1
77
Rails Assets wroc_love.rb
teamon
1
580
Angular replacements for jQuery-based libraries
teamon
1
220
Angular replacements for jQuery-based libraries
teamon
2
280
Rails Assets LRUG
teamon
0
6.9k
Other Decks in Programming
See All in Programming
チームでカレーを作ろう!アジャイルカレークッキング
akitotsukahara
0
890
Jetpack Compose best practices 動画紹介 @GoogleI/O LT会
takakitojo
0
400
What's new in Android development tools まとめ
mkeeda
0
410
Independently together: better developer experience & App performance
bcinarli
0
190
Beyond Micro Frontends: Frontend Moduliths for the Enterprise @enterjs2022
manfredsteyer
PRO
0
200
The strategies behind ddd – AdeoDevSummit 2022
lilobase
PRO
5
270
Beyond Micro Frontends: Frontend Moduliths for the Enterprise @wad2022
manfredsteyer
PRO
0
140
NEWT.net: Frontend Technology Selection
xpromx
0
280
開発速度を5倍早くするVSCodeの拡張機能を作った
purp1eeeee
2
170
UI Testing of Jetpack Compose Apps, AppDevCon
alexzhukovich
0
170
即、New Relic / New Relic NOW!
uzulla
0
340
Lancersをコンテナへ本番移行する取り組み
rvirus0817
1
420
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
316
22k
What's in a price? How to price your products and services
michaelherold
229
9.4k
Faster Mobile Websites
deanohume
294
28k
Stop Working from a Prison Cell
hatefulcrawdad
261
17k
Practical Orchestrator
shlominoach
178
8.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
10
3.5k
Designing the Hi-DPI Web
ddemaree
272
32k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
100
5.9k
Support Driven Design
roundedbygravity
86
8.5k
Writing Fast Ruby
sferik
612
57k
How To Stay Up To Date on Web Technology
chriscoyier
780
250k
Side Projects
sachag
450
37k
Transcript
GIT MONTERAIL STYLE © Tymon Tobolski, 2015
Note about the language ... © Tymon Tobolski, 2015
BASICS © Tymon Tobolski, 2015
COMMIT FLOW © Tymon Tobolski, 2015
BRANCHING © Tymon Tobolski, 2015
PROTIP: NEW BRANCH $ git branch feature $ git checkout
feature is the same as $ git checkout -b feature © Tymon Tobolski, 2015
MERGING © Tymon Tobolski, 2015
PUSH & PULL © Tymon Tobolski, 2015
CONFIGURATION $ git config --global user.name "Tymon Tobolski" $ git
config --global user.email "tymon.tobolski@monterail.com" © Tymon Tobolski, 2015
~/.gitconfig [user] name = Tymon Tobolski email = tymon.tobolski@monterail.com [rerere]
enabled = true [github] user = teamon [alias] st = status ci = commit co = checkout br = branch ph = push pl = pull [core] excludesfile = /Users/teamon/.gitignore_global [push] default = simple © Tymon Tobolski, 2015
PROTIP: ALIASES # .gitconfig [alias] st = status ci =
commit co = checkout br = branch ph = push pl = pull # later in shell $ git co feature/JIRA-123 © Tymon Tobolski, 2015
.gitignore (RAILS APP) # Ignore bundler config. /.bundle # Ignore
the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal # Ignore all logfiles and tempfiles. /log/*.log /tmp # Ignore personal setup /config/database.yml © Tymon Tobolski, 2015
~/.gitignore_global (SYSTEM WIDE) # Logs and databases *.log *.sql #
OS generated files .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes Icon? # Ruby stuff .ruby-version .rbenv-version .rbenv-vars # and more ... © Tymon Tobolski, 2015
~/.gitignore_global SETUP $ git config --global core.excludesfile ~/.gitignore_global REFERENCES ▸
http://islegend.com/development/setting-global-gitignore-mac-windows/ ▸ https://help.github.com/articles/ignoring-files/#create-a-global- gitignore © Tymon Tobolski, 2015
PROTIP: PROMPT google "git bash prompt" © Tymon Tobolski, 2015
COMMIT MESSAGE [JIRA-123] Capitalized, short (50 chars or less) summary
More detailed explanatory text, if necessary. It can span multiple lines. [skip ci] github.com/monterail/guidelines/blob/master/git.md © Tymon Tobolski, 2015
Write present-tense, imperative-style commit messages GOOD: [JIRA-123] Add currency service
BAD: [JIRA-123] Adds currency service BAD: [JIRA-123] Added currency service © Tymon Tobolski, 2015
If commit is for some reason not assigned to any
ticket, we use following tags: [fix] Changes fixing code not assigned to issue [docs] Changes of documentation, not affecting code [style] Changes that do not affect the meaning of the code [refactor] Changes that affect code, but not behavior of app [perf] Changes that improve performance [test] Adding missing tests [chore] Other, usually boring or repeating tasks © Tymon Tobolski, 2015
REBASE © Tymon Tobolski, 2015
"MERGE HELL" © Tymon Tobolski, 2015
CASE 1 TWO DEVELOPERS WORKING ON THE SAME FEATURE ©
Tymon Tobolski, 2015
merge rebase © Tymon Tobolski, 2015
CASE 2 MERGING MULTIPLE FEATURES © Tymon Tobolski, 2015
merge rebase © Tymon Tobolski, 2015
REBASE © Tymon Tobolski, 2015
REBASE Getting up to date with master $ git checkout
feat/abc $ git rebase master Merging feature into master $ git checkout master $ git merge --no-ff feat/abc © Tymon Tobolski, 2015
PROTIP: GIT UP $ gem install git-up $ git up
master up to date feature/ABC-123 rebasing... feature/ABC-456 fast-forwarding... preprod up to date github.com/aanand/git-up © Tymon Tobolski, 2015
QUESTIONS? © Tymon Tobolski, 2015