$30 off During Our Annual Pro Sale. View Details »
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
70
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
打 造 A I 驅 動 的 G i t H u b ⾃ 動 化 ⼯ 作 流 程
appleboy
0
270
Connecting Your Worlds: A Guide to Integrating GitHub Actions and Jenkins
appleboy
0
49
From Natural Language to K8s Operations: The MCP Architecture and Practice of kubectl-ai
appleboy
0
810
What’s MCP && Authorization?
appleboy
0
93
Building a Unified API Gateway for Secure and Scalable Cross-Cloud AI Service
appleboy
0
1.6k
Building MCP (Model Context Protocol) with Golang
appleboy
0
3k
如何設計一套具備 Container 容器化技術的 CI/CD 平台?
appleboy
0
1.6k
生成式 AI CodeGPT 開發經驗談
appleboy
0
3.2k
打造 MLOps 平台 改善 AI 模型開發流程
appleboy
0
2.3k
Other Decks in Technology
See All in Technology
MLflowで始めるプロンプト管理、評価、最適化
databricksjapan
1
130
Lessons from Migrating to OpenSearch: Shard Design, Log Ingestion, and UI Decisions
sansantech
PRO
1
110
小さな判断で育つ、大きな意思決定力 / 20251204 Takahiro Kinjo
shift_evolve
PRO
1
600
乗りこなせAI駆動開発の波
eltociear
1
1.1k
AI活用によるPRレビュー改善の歩み ― 社内全体に広がる学びと実践
lycorptech_jp
PRO
1
200
A Compass of Thought: Guiding the Future of Test Automation ( #jassttokai25 , #jassttokai )
teyamagu
PRO
1
250
AI時代の開発フローとともに気を付けたいこと
kkamegawa
0
2.7k
技術以外の世界に『越境』しエンジニアとして進化を遂げる 〜Kotlinへの愛とDevHRとしての挑戦を添えて〜
subroh0508
1
430
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
140
Lambdaの常識はどう変わる?!re:Invent 2025 before after
iwatatomoya
1
440
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
410
安いGPUレンタルサービスについて
aratako
2
2.7k
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
95
14k
Typedesign – Prime Four
hannesfritz
42
2.9k
How to train your dragon (web standard)
notwaldorf
97
6.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Writing Fast Ruby
sferik
630
62k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Language of Interfaces
destraynor
162
25k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Docker and Python
trallard
47
3.7k
GraphQLとの向き合い方2022年版
quramy
50
14k
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