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
71
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
戰略轉變:從建構 AI 代理人到發展可擴展的技能生態系統
appleboy
0
190
The Smart Choice for Command-Line Image Resizing
appleboy
0
12
SSH for GitHub Actions
appleboy
0
26
打 造 A I 驅 動 的 G i t H u b ⾃ 動 化 ⼯ 作 流 程
appleboy
0
500
Connecting Your Worlds: A Guide to Integrating GitHub Actions and Jenkins
appleboy
0
75
From Natural Language to K8s Operations: The MCP Architecture and Practice of kubectl-ai
appleboy
0
1k
What’s MCP && Authorization?
appleboy
0
100
Building a Unified API Gateway for Secure and Scalable Cross-Cloud AI Service
appleboy
0
1.7k
Building MCP (Model Context Protocol) with Golang
appleboy
0
3.2k
Other Decks in Technology
See All in Technology
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
Oracle Cloud Infrastructure:2025年12月度サービス・アップデート
oracle4engineer
PRO
0
220
「違う現場で格闘する二人」——社内コミュニティがつないだトヨタ流アジャイルの実践とその先
shinichitakeuchi
0
220
製造業から学んだ「本質を守り現場に合わせるアジャイル実践」
kamitokusari
0
500
迷わない!AI×MCP連携のリファレンスアーキテクチャ完全ガイド
cdataj
0
370
re:Invent2025 セッションレポ ~Spec-driven development with Kiro~
nrinetcom
PRO
2
170
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
310
Redshift認可、アップデートでどう変わった?
handy
1
130
AWSと生成AIで学ぶ!実行計画の読み解き方とSQLチューニングの実践
yakumo
2
330
技術選定、下から見るか?横から見るか?
masakiokuda
0
190
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
21k
AWS re:Invent2025最新動向まとめ(NRIグループre:Cap 2025)
gamogamo
0
160
Featured
See All Featured
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
410
Rails Girls Zürich Keynote
gr2m
95
14k
Designing Experiences People Love
moore
143
24k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
54
Typedesign – Prime Four
hannesfritz
42
2.9k
Become a Pro
speakerdeck
PRO
31
5.8k
How to make the Groovebox
asonas
2
1.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Facilitating Awesome Meetings
lara
57
6.7k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
210
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
130
Between Models and Reality
mayunak
1
160
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