Upload
js-lee
View
2.815
Download
0
Embed Size (px)
Citation preview
Code Review On GitHub Intermediate training
jslee 2011/11/25
13年2月17⽇日星期⽇日
Integration-Manager Workflow
13年2月17⽇日星期⽇日
keep code up to date• git remote add delta-cloud • git fetch delta-cloud• * [new branch] develop -> delta-cloud/develop• * [new branch] master -> delta-cloud/master
• git diff master..delta-cloud/master• git merge delta-cloud/master• -----------------------------------------------• 以上同等於• git pull delta-cloud develop:develop
13年2月17⽇日星期⽇日
git branch
13年2月17⽇日星期⽇日
git branch
13年2月17⽇日星期⽇日
git checkout testing
13年2月17⽇日星期⽇日
git commit (on testing)
13年2月17⽇日星期⽇日
git commit (on testing)
13年2月17⽇日星期⽇日
git checkout master
13年2月17⽇日星期⽇日
git commit (on master)
13年2月17⽇日星期⽇日
master / develop
13年2月17⽇日星期⽇日
Master is
each time when changes are merged back into master, this is a new production release by definition. We tend to be very strict at this, so that theoretically, we could use a Git hook script to automatically build and roll-out our software to our production servers everytime there was a commit on master.
13年2月17⽇日星期⽇日
develop is
• code for Next release
13年2月17⽇日星期⽇日
Feature branch
13年2月17⽇日星期⽇日
Feature branch
• 從develop 分⽀支出來實驗性質的 branch• 完成後會被回develop
• 開始:develop• 結束:develop
13年2月17⽇日星期⽇日
Release branches
• 從develop 分⽀支出來 ready for release的branch
• 只能在上⾯面commit bug fix• release 成功併回master/ 失敗繼續回
develop• 開始:develop• 結束:develop or master
13年2月17⽇日星期⽇日
Hotfix branches
13年2月17⽇日星期⽇日
Hotfix branches
• 從master 分⽀支出來,為的是要修正master上必須要⽴立刻修復的bug
• 結束merge 回master,並為master加上tag新版本
• 開始:master• 結束:develop and master
13年2月17⽇日星期⽇日
git flow
13年2月17⽇日星期⽇日
Q1: 有哪些branch從develop分⽀支出來?
13年2月17⽇日星期⽇日
Q2: 有哪些branch可以合併回master?
13年2月17⽇日星期⽇日
Q3:不知道要放哪裡的code 要放在哪裡?
13年2月17⽇日星期⽇日
實例
13年2月17⽇日星期⽇日
tool
• https://github.com/jsleetw/gitflow
13年2月17⽇日星期⽇日