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
Git Flow and JavaScript Coding Style
git merge develop
Git Flow and JavaScript Coding Style
New commit
Merge branch 'develop' into response (HEAD, response)
Git Flow and JavaScript Coding Style
git merge develop again
Git Flow and JavaScript Coding Style
New commit
Merge branch 'develop' into response (HEAD, response)
git checkout develop
git merge --no-ff response
Git Flow and JavaScript Coding Style
Git rebase
• Create your branch
– $ git checkout –b ‘response’
• Merge from master branch
– $ git rebase develop
Git Flow and JavaScript Coding Style
Git rebase master
Git Flow and JavaScript Coding Style
No more new commit log
Git rebase master again
Git Flow and JavaScript Coding Style
No more new commit log
Create your new Pull Request
git merge --no-ff respnse
Git Flow and JavaScript Coding Style
git rebase vs git merge
network graph
Git Flow and JavaScript Coding Style
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

More Related Content

PDF
Git flow Introduction
PDF
Git Tricks — git utilities that make life git easier
PDF
Git and git flow
PDF
沒有 GUI 的 Git
PDF
Git Workflow With Gitflow
PDF
Git flow for daily use
PPTX
Git flow Introduction
Git Tricks — git utilities that make life git easier
Git and git flow
沒有 GUI 的 Git
Git Workflow With Gitflow
Git flow for daily use

What's hot (20)

PDF
Brief tutorial on Git
ODP
Git Flow - An Introduction
PPT
Open Source Collaboration With Git And Git Hub
PDF
Git Tricks
PDF
Git-flow workflow and pull-requests
PDF
Git & gitflow
PDF
19 GitFlow #burningkeyboards
PPTX
Git flow
PDF
Git Series. Episode 3. Git Flow and Github-Flow
PPTX
Git and git workflow best practice
PDF
Git basics for beginners
PDF
PPT
Git workflows presentation
PDF
Git flow cheatsheet
PDF
Git introduction for Beginners
KEY
Git branching-model
PPTX
Git presentation
PPTX
Why Aren't You Using Git Flow?
PDF
Git and git hub
PPTX
A painless self-hosted Git service: Gitea
Brief tutorial on Git
Git Flow - An Introduction
Open Source Collaboration With Git And Git Hub
Git Tricks
Git-flow workflow and pull-requests
Git & gitflow
19 GitFlow #burningkeyboards
Git flow
Git Series. Episode 3. Git Flow and Github-Flow
Git and git workflow best practice
Git basics for beginners
Git workflows presentation
Git flow cheatsheet
Git introduction for Beginners
Git branching-model
Git presentation
Why Aren't You Using Git Flow?
Git and git hub
A painless self-hosted Git service: Gitea
Ad

Viewers also liked (20)

PPTX
PHP & JavaScript & CSS Coding style
PPTX
How to choose web framework
PDF
Introduction to Grunt.js on Taiwan JavaScript Conference
PDF
Gearman work queue in php
PDF
Phpconf 2011 introduction_to_codeigniter
PDF
Introduction to git
PPTX
Git flow 與團隊合作
PPTX
Why to choose laravel framework
PPTX
用 Docker 改善團隊合作模式
PPTX
Write microservice in golang
PDF
How to integrate front end tool via gruntjs
PDF
advanced introduction to codeigniter
PDF
2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy
PDF
You must know about CodeIgniter Popular Library
PDF
Introduction to MVC of CodeIgniter 2.1.x
PPTX
Docker 基礎介紹與實戰
PDF
Automating your workflow with Gulp.js
PDF
Verzovani kodu s Gitem (Karel Minarik)
PDF
Git rebase explained
PDF
Git Rebase vs Merge
PHP & JavaScript & CSS Coding style
How to choose web framework
Introduction to Grunt.js on Taiwan JavaScript Conference
Gearman work queue in php
Phpconf 2011 introduction_to_codeigniter
Introduction to git
Git flow 與團隊合作
Why to choose laravel framework
用 Docker 改善團隊合作模式
Write microservice in golang
How to integrate front end tool via gruntjs
advanced introduction to codeigniter
2014 OSDC Talk: Introduction to Percona XtraDB Cluster and HAProxy
You must know about CodeIgniter Popular Library
Introduction to MVC of CodeIgniter 2.1.x
Docker 基礎介紹與實戰
Automating your workflow with Gulp.js
Verzovani kodu s Gitem (Karel Minarik)
Git rebase explained
Git Rebase vs Merge
Ad

Similar to Git Flow and JavaScript Coding Style (20)

PPTX
Git tips
KEY
Git Distributed Version Control System
PPTX
simple Git
PDF
Git and Github workshop ppt slide by slide
PDF
Git and Github slides.pdf
PPTX
Introduction To Git Workshop
PPT
Distributed Version control using Git and Github
PPT
Git-GitHub.ppt Diploma in computer. engineering
PPT
Report about the dangers of git and github on the environment
PPT
Git-GitHub.ppt for teaching all college stidents
PDF
Git cheat-sheets
PPTX
Introduction into Git
PPTX
Git demo for beginners-Learning path to evolve
PDF
Wokshop de Git
PPT
Talk to git
PPTX
Session git
PDF
Collaborative development with Git | Workshop
PDF
Git Started With Git
PDF
Git tutorial
KEY
Git Tech Talk
Git tips
Git Distributed Version Control System
simple Git
Git and Github workshop ppt slide by slide
Git and Github slides.pdf
Introduction To Git Workshop
Distributed Version control using Git and Github
Git-GitHub.ppt Diploma in computer. engineering
Report about the dangers of git and github on the environment
Git-GitHub.ppt for teaching all college stidents
Git cheat-sheets
Introduction into Git
Git demo for beginners-Learning path to evolve
Wokshop de Git
Talk to git
Session git
Collaborative development with Git | Workshop
Git Started With Git
Git tutorial
Git Tech Talk

More from Bo-Yi Wu (17)

PDF
Drone CI/CD 自動化測試及部署
PDF
用 Go 語言打造多台機器 Scale 架構
PDF
Job Queue in Golang
PDF
Golang Project Layout and Practice
PDF
Introduction to GitHub Actions
PDF
Drone 1.0 Feature
PDF
Drone CI/CD Platform
PDF
GraphQL IN Golang
PPTX
Go 語言基礎簡介
PPTX
drone continuous Integration
PPTX
Gorush: A push notification server written in Go
PPTX
用 Drone 打造 輕量級容器持續交付平台
PPTX
用 Go 語言 打造微服務架構
PPTX
Introduction to Gitea with Drone
PDF
運用 Docker 整合 Laravel 提升團隊開發效率
PDF
用 Go 語言實戰 Push Notification 服務
PPTX
用 Go 語言打造 DevOps Bot
Drone CI/CD 自動化測試及部署
用 Go 語言打造多台機器 Scale 架構
Job Queue in Golang
Golang Project Layout and Practice
Introduction to GitHub Actions
Drone 1.0 Feature
Drone CI/CD Platform
GraphQL IN Golang
Go 語言基礎簡介
drone continuous Integration
Gorush: A push notification server written in Go
用 Drone 打造 輕量級容器持續交付平台
用 Go 語言 打造微服務架構
Introduction to Gitea with Drone
運用 Docker 整合 Laravel 提升團隊開發效率
用 Go 語言實戰 Push Notification 服務
用 Go 語言打造 DevOps Bot

Recently uploaded (20)

PDF
Getting Started with Data Integration: FME Form 101
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Five Habits of High-Impact Board Members
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Hybrid model detection and classification of lung cancer
DOCX
search engine optimization ppt fir known well about this
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
August Patch Tuesday
Getting Started with Data Integration: FME Form 101
Final SEM Unit 1 for mit wpu at pune .pptx
Module 1.ppt Iot fundamentals and Architecture
Hindi spoken digit analysis for native and non-native speakers
1 - Historical Antecedents, Social Consideration.pdf
Enhancing emotion recognition model for a student engagement use case through...
Five Habits of High-Impact Board Members
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
WOOl fibre morphology and structure.pdf for textiles
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
A contest of sentiment analysis: k-nearest neighbor versus neural network
A review of recent deep learning applications in wood surface defect identifi...
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
O2C Customer Invoices to Receipt V15A.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Hybrid model detection and classification of lung cancer
search engine optimization ppt fir known well about this
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
August Patch Tuesday

Git Flow and JavaScript Coding Style