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
62
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
如何設計一套具備 Container 容器化技術的 CI/CD 平台?
appleboy
0
1.4k
生成式 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
善用 Go 語言效能測試工具來提升執行效率
appleboy
2
4.4k
用 Go 語言打造多台機器 Scale 架構
appleboy
1
4.6k
Other Decks in Technology
See All in Technology
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
180
変化する開発、進化する体系時代に適応するソフトウェアエンジニアの知識と考え方(JaSST'25 Kansai)
mizunori
0
150
Uniadex__公開版_20250617-AIxIoTビジネス共創ラボ_ツナガルチカラ_.pdf
iotcomjpadmin
0
150
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
150
【TiDB GAME DAY 2025】Shadowverse: Worlds Beyond にみる TiDB 活用術
cygames
0
900
プロダクトエンジニアリング組織への歩み、その現在地 / Our journey to becoming a product engineering organization
hiro_torii
0
110
Windows 11 で AWS Documentation MCP Server 接続実践/practical-aws-documentation-mcp-server-connection-on-windows-11
emiki
0
740
登壇ネタの見つけ方 / How to find talk topics
pinkumohikan
3
320
CI/CDとタスク共有で加速するVibe Coding
tnbe21
0
230
BrainPadプログラミングコンテスト記念LT会2025_社内イベント&問題解説
brainpadpr
0
160
Observability в PHP без боли. Олег Мифле, тимлид Altenar
lamodatech
0
300
成立するElixirの再束縛(再代入)可という選択
kubell_hr
0
950
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
660
Balancing Empowerment & Direction
lara
1
350
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Speed Design
sergeychernyshev
31
1k
Building an army of robots
kneath
306
45k
VelocityConf: Rendering Performance Case Studies
addyosmani
330
24k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
700
Designing Experiences People Love
moore
142
24k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
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