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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Bo-Yi Wu
January 24, 2016
Technology
85
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Git Flow and Coding Style
Bo-Yi Wu
January 24, 2016
More Decks by Bo-Yi Wu
See All by Bo-Yi Wu
從觀望到全公司落地:AI Agentic Coding 導入實戰 — 流程整合與安全治理
appleboy
1
1.7k
打造你的 AI 工作流:Agent Skill + MCP 實戰工作坊
appleboy
0
1.2k
從開發到部署全都交給 AI:實作 AI 驅動的自動化流程
appleboy
1
310
AI 不只幫你寫 Code: 當專案從 300 暴增到 1500, 我們如何撐住 DevOps
appleboy
1
430
Agent Skill 是什麼?對軟體產業帶來的變化
appleboy
0
3.2k
用 Claude Code + GitHub Copilot Review 打造 AI 驅動的開發流程
appleboy
0
2.1k
戰略轉變:從建構 AI 代理人到發展可擴展的技能生態系統
appleboy
0
340
The Smart Choice for Command-Line Image Resizing
appleboy
0
70
SSH for GitHub Actions
appleboy
0
360
Other Decks in Technology
See All in Technology
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
620
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
620
初めてのGitHub Actions / GitHub Actions at First
tooppoo
0
150
侵入は突然に 〜 IoTマルウェアと悪用される家庭の機器 ~ / When Intrusion Strikes: IoT Malware and the Abuse of Home Devices
nttcom
0
1.5k
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
220
ガバメント AI 源内を地方自治体は活用できるのか可能性と課題、期待について
takeda_h
1
340
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
モバイルアプリ開発概論2026
recruitengineers
PRO
3
490
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
150
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
第3回しろおびセキュリティスポンサーセッション
log0417
0
160
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
470
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
BBQ
matthewcrist
89
10k
Google's AI Overviews - The New Search
badams
0
1.1k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Being A Developer After 40
akosma
91
590k
Paper Plane
katiecoart
PRO
2
52k
Scaling GitHub
holman
464
140k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Navigating Weather and Climate Data
rabernat
0
460
YesSQL, Process and Tooling at Scale
rocio
174
15k
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