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
74
0
Share
Git Flow and Coding Style
Bo-Yi Wu
January 24, 2016
More Decks by Bo-Yi Wu
See All by Bo-Yi Wu
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
1.2k
用 Claude Code + GitHub Copilot Review 打造 AI 驅動的開發流程
appleboy
0
930
戰略轉變:從建構 AI 代理人到發展可擴展的技能生態系統
appleboy
0
300
The Smart Choice for Command-Line Image Resizing
appleboy
0
49
SSH for GitHub Actions
appleboy
0
220
打 造 A I 驅 動 的 G i t H u b ⾃ 動 化 ⼯ 作 流 程
appleboy
0
980
Connecting Your Worlds: A Guide to Integrating GitHub Actions and Jenkins
appleboy
0
140
From Natural Language to K8s Operations: The MCP Architecture and Practice of kubectl-ai
appleboy
0
1.8k
What’s MCP && Authorization?
appleboy
0
120
Other Decks in Technology
See All in Technology
QAエンジニアはどうやって プロダクト議論の場に入れるのか?
moritamasami
2
330
雑談は、センサーだった
bitkey
PRO
2
190
Scovilleモバイルエンジニア募集中.pdf
julienrudin
0
150
Oracle Cloud Infrastructure:2026年4月度サービス・アップデート
oracle4engineer
PRO
0
280
Building a Study Buddy AI Agent from Scratch: From Passive Chatbots to Autonomous Systems
itchimonji
0
120
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
4
1.7k
『生成AI時代のクレデンシャルとパーミッション設計 — Claude Code を起点に』の執筆企画
takuros
2
2k
色を視る
yuzneri
0
310
FessのAI検索モード:検索システムとLLMへの取り組み
marevol
0
180
AIが盛んな時代に 技術記事を書き始めて起きた私の中での小さな変化
peintangos
0
340
AIはハッカーを減らすのか、増やすのか?──現役ホワイトハッカーから見るAI時代のリアル【MEGU-Meet】
cscengineer
PRO
0
270
独断と偏見で試してみる、 シングル or マルチエージェント どっちがいいの?
shichijoyuhi
1
240
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
sira's awesome portfolio website redesign presentation
elsirapls
0
230
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
330
The Cult of Friendly URLs
andyhume
79
6.9k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
WCS-LA-2024
lcolladotor
0
560
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
A Modern Web Designer's Workflow
chriscoyier
698
190k
The untapped power of vector embeddings
frankvandijk
2
1.7k
Paper Plane
katiecoart
PRO
1
49k
The Spectacular Lies of Maps
axbom
PRO
1
720
Paper Plane (Part 1)
katiecoart
PRO
0
6.9k
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