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
200
The Smart Choice for Command-Line Image Resizing
appleboy
0
16
SSH for GitHub Actions
appleboy
0
63
打 造 A I 驅 動 的 G i t H u b ⾃ 動 化 ⼯ 作 流 程
appleboy
0
600
Connecting Your Worlds: A Guide to Integrating GitHub Actions and Jenkins
appleboy
0
90
From Natural Language to K8s Operations: The MCP Architecture and Practice of kubectl-ai
appleboy
0
1.2k
What’s MCP && Authorization?
appleboy
0
100
Building a Unified API Gateway for Secure and Scalable Cross-Cloud AI Service
appleboy
0
1.8k
Building MCP (Model Context Protocol) with Golang
appleboy
0
3.3k
Other Decks in Technology
See All in Technology
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.6k
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
0
790
Agile Leadership Summit Keynote 2026
m_seki
1
490
あたらしい上流工程の形。 0日導入からはじめるAI駆動PM
kumaiu
5
760
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
400
AWS Network Firewall Proxyを触ってみた
nagisa53
0
140
システムのアラート調査をサポートするAI Agentの紹介/Introduction to an AI Agent for System Alert Investigation
taddy_919
2
1.9k
Context Engineeringの取り組み
nutslove
0
290
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
270
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
73k
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
600
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
The Spectacular Lies of Maps
axbom
PRO
1
520
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.8k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
310
Prompt Engineering for Job Search
mfonobong
0
160
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
Everyday Curiosity
cassininazir
0
130
The Pragmatic Product Professional
lauravandoore
37
7.1k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
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