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
360
用 Claude Code + GitHub Copilot Review 打造 AI 驅動的開發流程
appleboy
0
290
戰略轉變:從建構 AI 代理人到發展可擴展的技能生態系統
appleboy
0
270
The Smart Choice for Command-Line Image Resizing
appleboy
0
40
SSH for GitHub Actions
appleboy
0
170
打 造 A I 驅 動 的 G i t H u b ⾃ 動 化 ⼯ 作 流 程
appleboy
0
880
Connecting Your Worlds: A Guide to Integrating GitHub Actions and Jenkins
appleboy
0
130
From Natural Language to K8s Operations: The MCP Architecture and Practice of kubectl-ai
appleboy
0
1.7k
What’s MCP && Authorization?
appleboy
0
120
Other Decks in Technology
See All in Technology
Databricksを用いたセキュアなデータ基盤構築とAIプロダクトへの応用.pdf
pkshadeck
PRO
0
210
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
28k
Kubernetes基盤における開発者体験 とセキュリティの両⽴ / Balancing developer experience and security in a Kubernetes-based environment
chmikata
0
210
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
Data Intelligence Engineering Unit 部門と各ポジション紹介
sansantech
PRO
0
130
仕様通り動くの先へ。Claude Codeで「使える」を検証する
gotalab555
8
3k
不確実性と戦いながら見積もりを作成するプロセス/mitsumori-process
hirodragon112
1
200
バックオフィスPJのPjMをコーポレートITが担うとうまくいく3つの理由
yueda256
1
290
試されDATA SAPPORO [LT]Claude Codeで「ゆっくりデータ分析」
ishikawa_satoru
0
310
40代からのアウトプット ― 経験は価値ある学びに変わる / 20260404 Naoki Takahashi
shift_evolve
PRO
5
900
チームで育てるAI自走環境_20260409
fuktig
0
930
機能・非機能の学びを一つに!Agent Skillsで月間レポート作成始めてみた / Unifying Bug & Infra Insights — Building Monthly Quality Reports with Agent Skills
bun913
5
3.7k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
22k
Bash Introduction
62gerente
615
210k
Between Models and Reality
mayunak
3
260
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
A Tale of Four Properties
chriscoyier
163
24k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
120
A designer walks into a library…
pauljervisheath
211
24k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
240
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
180
Building Adaptive Systems
keathley
44
3k
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