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
Git Flow and Coding Style
Search
Bo-Yi Wu
January 24, 2016
Technology
0
64
Git Flow and Coding Style
Bo-Yi Wu
January 24, 2016
Tweet
Share
More Decks by Bo-Yi Wu
See All by Bo-Yi Wu
Building a Unified API Gateway for Secure and Scalable Cross-Cloud AI Service
appleboy
0
7
Building MCP (Model Context Protocol) with Golang
appleboy
0
370
如何設計一套具備 Container 容器化技術的 CI/CD 平台?
appleboy
0
1.5k
生成式 AI CodeGPT 開發經驗談
appleboy
0
3k
打造 MLOps 平台 改善 AI 模型開發流程
appleboy
0
2.2k
自動化監控伺服器工具 - Gatus
appleboy
0
4k
Drone CI/CD 自動化測試及部署
appleboy
1
510
初探 Infrastructure as Code 工具 Pulumi
appleboy
2
3.6k
Introduction to Open Policy Agent
appleboy
0
2k
Other Decks in Technology
See All in Technology
ビギナーであり続ける/beginning
ikuodanaka
3
770
スタートアップに選択肢を 〜生成AIを活用したセカンダリー事業への挑戦〜
nstock
0
250
MUITにおける開発プロセスモダナイズの取り組みと開発生産性可視化の取り組みについて / Modernize the Development Process and Visualize Development Productivity at MUIT
muit
2
17k
american aa airlines®️ USA Contact Numbers: Complete 2025 Support Guide
aaguide
0
310
品質と速度の両立:生成AI時代の品質保証アプローチ
odasho
1
390
いつの間にか入れ替わってる!?新しいAWS Security Hubとは?
cmusudakeisuke
0
130
AI時代の開発生産性を加速させるアーキテクチャ設計
plaidtech
PRO
3
160
インフラ寄りSREの生存戦略
sansantech
PRO
4
1.6k
ビジネス職が分析も担う事業部制組織でのデータ活用の仕組みづくり / Enabling Data Analytics in Business-Led Divisional Organizations
zaimy
0
130
怖くない!はじめてのClaude Code
shinya337
0
410
Lazy application authentication with Tailscale
bluehatbrit
0
220
ビズリーチが挑む メトリクスを活用した技術的負債の解消 / dev-productivity-con2025
visional_engineering_and_design
3
7.9k
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
Six Lessons from altMBA
skipperchong
28
3.9k
The Invisible Side of Design
smashingmag
301
51k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
510
How to train your dragon (web standard)
notwaldorf
96
6.1k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
690
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Transcript
Git Flow and Coding Style Bo-Yi Wu 2015/04/10
Agenda • Git merge vs Git rebase. • JavaScript Coding
Style.
Git merge vs Git rebase
Git merge • Create your branch – $ git checkout –b
‘response’ • Merge from develop branch – $ git merge develop
None
git merge develop
None
New commit Merge branch 'develop' into response (HEAD, response)
None
git merge develop again
None
New commit Merge branch 'develop' into response (HEAD, response)
git checkout develop git merge --no-ff response
None
Git rebase • Create your branch – $ git checkout –b
‘response’ • Merge from master branch – $ git rebase develop
None
Git rebase master
None
No more new commit log
Git rebase master again
None
No more new commit log
Create your new Pull Request git merge --no-ff respnse
None
git rebase vs git merge network graph
None
Rebase vs Merge 優缺點 rebase merge 避免過多 merge
commit log 產生 merge commit log Branch commit log 排到最前面(方便追 蹤) 依照時間排序 commit log network graph 清楚 network graph 不易理解 各別 commit 解決 conflict 一次將全部衝突顯示 可任意修改 commit log 可合併多個 commit (避免過多無意義 commit log)
Rebase vs Merge 使用時機 rebase merge 整理 Branch
commit log 主分支記錄合併 xxxx branch 非主分支開發無需記錄何時合併主分支 主分支請勿使用 rebase 合併任何分支
Develop Note Please rebase master branch and test again before
creating new Pull Request
JavaScript Coding Style Guide
原先架構 https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
Google JavaScript Style Guide 無任何範例可參考
Airbnb JavaScript Style Guide https://github.com/airbnb/javascript
Airbnb JavaScript Style Guide 程式碼範例完整 另外也可以參考 ES6 Branch
Yoda Conditions https://en.wikipedia.org/wiki/Yoda_conditions if ($a === ‘1’) { // code
block } if (‘1’ === $a) { // code block } 程式閱讀性高 程式閱讀性低
Yoda Conditions https://en.wikipedia.org/wiki/Yoda_conditions if ($a = ‘1’) { // code
block } 避免此種情況發生
How to prevent the condition? Write Unit Test
Thanks