SlideShare a Scribd company logo
1 of 29
By Walter Liu
WRS GIT branching model (draft)
Agenda
》 GIT Branches
》 How to work
》 Others
× Purpose behind
× Misc – Tips
× Misc – Troubleshooting
× RPM repo
× Versioning
GIT BRACHES
Overview
Private Personal Branch
》 Name: <account_name>
》 Set git remote branch to this
》 For developer daily work.
》 Promote to dev branch
》 Pull updates from dev branch
Dev branch (1/2)
Develop branch (2/2)
》 Name: dev
》 Require functional and unit test ready.
》 It’s best to have CI.
》 For dev build.
》 Promote to master branch
》 Update from
× Private branch
× Feature branch
× Hotfix branch
OUR master branch
》 Name: 1.0, 2.0 …..
》 Promote source from dev branch.
》 Release staging-candidate build.
× At the same time, tag it with
release version.
》 Update from
× dev branch
× hotfix branch
Feature Branch
》 Name: feature_<Feature_name>
× Example: feature_odin_authentication
》 Scenario:
× Feature that impact integration test
› Example: odin_authentication.
× Big feature
× Big project with many people
》 Promote to dev branch
》 Pull update from dev branch
Hotfix branch
》 Prefix:
× hotfix-<TT_number>-
<TT_number>.....
》 Scenario
× If your dev branch is working on
something.
》 Pull from master branch
》 Promote to
× master branch(s)
× dev branch
*Remember to prompt code to master and dev at the same time.
HOW TO WORK
So, how should we work.
》 For developers,
× Project start
› Create remote private branch.
› Set git remote branch to your private branch.
× Work on it, daily push source to private branch.
× Once finish a feature and it’s unit/functional test. Push to dev branch.
》 For RD lead,
× At project start, notify team members the git guidelines.
× START A NEW GIT PROJECT, see next slide
× [Recommended] Setup CI on dev and master branch.
× Use dev for developer development and test.
× For release a new build to OPS or staging test.
› Ensure the code quality is good enough.
› Promote code from dev to master branch.
› Git tag and master with release version.
Start a new git project
》 Create 1.0 or 2.0 .... For release
× Set it protected
》 Create dev branch
》 Set default branch to dev
》 Remove master branch
New Project
Set default branch
New Project
Set projected branch
Create a new remote branch
and track it locally
》 “Create branch on gitlab” or
》 git fetch origin
》 git branch --track <branch> origin/<branch>
》 git checkout <branch>
OR
# -b create new branch from dev branch
》 git checkout –b <new_branch> dev
# -u ,push source to remote and setup tracking
》 git push –u origin <new_branch>
Update source from dev
branch to private branch
》 git checkout <private_branch>
》 git pull
》 git merge dev
》 git push
OR
》 git pull origin dev <private_branch>
Promote source from private
branch to dev branch
》 git checkout dev
》 git pull
》 git merge <private_branch>
》 git push
OR
》 git push origin <private_branch>:dev
Promote source from dev
branch to master branch
》 Similar to last page
OR
# make sure local dev branch updated
#  git pull origin dev
》 git push origin dev:master
Promote source from hotfix
branch to dev/master branch
# make sure local dev branch updated
# git pull origin hotfix-<..>
》 git push origin hotfix-<..>:master
》 git push origin hotfix-<..>:dev
Git tag
》 When,
× Release a build from master branch
》 Format: v<version>
》 Command
× git tag –a <tag_name>
× Use gitlab to tag. (easier)
》 Integrated in CI is recommended.
OTHERS
Purposes behind
》 Private personal branch
× Daily push to remote (HD broken)
× Lazy to switch branch (:P)
》 Tagging
× Tag release version on master branch for
easier trace back and troubleshooting.
》 Why 1.0, 2.0 branch?
× For module development
Misc - Tips
》 Rebase  Merge
》 No-fast-forward for feature branch
commit to dev branch.
》 For bug fixes
× Use interactive rebase to squash commits
into one.
× Easier to
› code view
› Traceback/troubleshooting
Misc – Troubleshooting
Check local/Remote branch
》 git branch –a
Remote repository status
》 git remote show origin
RPM repo
》 dev branch build to dev-repo
》 1.0/2.0… branch build to int-repo
》 QA promote a rpm from int-repo to stg-repo
》 OPS promote a rpm from stg-repo to prod-
repo
Versioning
》 dev branch and master branch should
use different version.
》 Since they put into different rpm repos,
it’s not required to use different formats.
References
》 http://nvie.com/posts/a-successful-git-
branching-model/
》 http://www.slideshare.net/lemiorhan/git-
branching-model
Q & A

More Related Content

Similar to WRS GIT Branching Model - draft

Microservices Development Process at Predix.io
Microservices Development Process at Predix.ioMicroservices Development Process at Predix.io
Microservices Development Process at Predix.ioConstantine Grigel
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow IntroductionDavid Paluy
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow Sebin Benjamin
 
Getting started with git svn
Getting started with git svnGetting started with git svn
Getting started with git svnManij Shrestha
 
Developing with versioning and CI/CD
Developing with versioning and CI/CDDeveloping with versioning and CI/CD
Developing with versioning and CI/CDMatteo Di Carlo
 
Acquia BLT for the Win, or How to speed up the project setup, development an...
Acquia BLT for the Win, or  How to speed up the project setup, development an...Acquia BLT for the Win, or  How to speed up the project setup, development an...
Acquia BLT for the Win, or How to speed up the project setup, development an...DrupalCamp Kyiv
 
Git for work groups ironhack talk
Git for work groups ironhack talkGit for work groups ironhack talk
Git for work groups ironhack talkTiago Ameller
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version ControlNowell Strite
 
Git and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentGit and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentLemi Orhan Ergin
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced gitGerrit Wanderer
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers WorkshopJody Garnett
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 
Constantly Contributing Pretty Patches FLCD
Constantly Contributing Pretty Patches FLCDConstantly Contributing Pretty Patches FLCD
Constantly Contributing Pretty Patches FLCDMark Casias
 
git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)Carlos Duarte do Nascimento
 
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesSalesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesAbhinav Gupta
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)GDSCNiT
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanJames Ford
 

Similar to WRS GIT Branching Model - draft (20)

Microservices Development Process at Predix.io
Microservices Development Process at Predix.ioMicroservices Development Process at Predix.io
Microservices Development Process at Predix.io
 
Git
GitGit
Git
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
An intro to git
An intro to gitAn intro to git
An intro to git
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
Getting started with git svn
Getting started with git svnGetting started with git svn
Getting started with git svn
 
Developing with versioning and CI/CD
Developing with versioning and CI/CDDeveloping with versioning and CI/CD
Developing with versioning and CI/CD
 
Acquia BLT for the Win, or How to speed up the project setup, development an...
Acquia BLT for the Win, or  How to speed up the project setup, development an...Acquia BLT for the Win, or  How to speed up the project setup, development an...
Acquia BLT for the Win, or How to speed up the project setup, development an...
 
Git for work groups ironhack talk
Git for work groups ironhack talkGit for work groups ironhack talk
Git for work groups ironhack talk
 
Embracing Distributed Version Control
Embracing Distributed Version ControlEmbracing Distributed Version Control
Embracing Distributed Version Control
 
Git and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentGit and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software Development
 
Checkitmobile advanced git
Checkitmobile advanced gitCheckitmobile advanced git
Checkitmobile advanced git
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Automated Drupal deployment with Git and Capistrano
Automated Drupal deployment with Git and CapistranoAutomated Drupal deployment with Git and Capistrano
Automated Drupal deployment with Git and Capistrano
 
Constantly Contributing Pretty Patches FLCD
Constantly Contributing Pretty Patches FLCDConstantly Contributing Pretty Patches FLCD
Constantly Contributing Pretty Patches FLCD
 
git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)
 
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket PipelinesSalesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
Salesforce CI (Continuous Integration) - SFDX + Bitbucket Pipelines
 
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
Open Sprintera (Where Open Source Sparks a Sprint of Possibilities)
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
 

More from Walter Liu

Generative AI 在手機遊戲發行上的應用介紹.pdf
Generative AI 在手機遊戲發行上的應用介紹.pdfGenerative AI 在手機遊戲發行上的應用介紹.pdf
Generative AI 在手機遊戲發行上的應用介紹.pdfWalter Liu
 
Infrastructure as code using Kubernetes
Infrastructure as code using KubernetesInfrastructure as code using Kubernetes
Infrastructure as code using KubernetesWalter Liu
 
手機遊戲數位行銷工具淺談
手機遊戲數位行銷工具淺談手機遊戲數位行銷工具淺談
手機遊戲數位行銷工具淺談Walter Liu
 
關於第三方追蹤廣告再行銷的那些事兒
關於第三方追蹤廣告再行銷的那些事兒關於第三方追蹤廣告再行銷的那些事兒
關於第三方追蹤廣告再行銷的那些事兒Walter Liu
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes WorkshopWalter Liu
 
Using Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCPUsing Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCPWalter Liu
 
Game DDOS Prevention
Game DDOS PreventionGame DDOS Prevention
Game DDOS PreventionWalter Liu
 
Airflow - a data flow engine
Airflow - a data flow engineAirflow - a data flow engine
Airflow - a data flow engineWalter Liu
 
Super Fast Gevent Introduction
Super Fast Gevent IntroductionSuper Fast Gevent Introduction
Super Fast Gevent IntroductionWalter Liu
 
HTTP/2 to web dev
HTTP/2 to web devHTTP/2 to web dev
HTTP/2 to web devWalter Liu
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 IntroductionWalter Liu
 
Consul - service discovery and others
Consul - service discovery and othersConsul - service discovery and others
Consul - service discovery and othersWalter Liu
 
Docker introduction
Docker introductionDocker introduction
Docker introductionWalter Liu
 
Salty OPS – Saltstack Introduction
Salty OPS – Saltstack IntroductionSalty OPS – Saltstack Introduction
Salty OPS – Saltstack IntroductionWalter Liu
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yumWalter Liu
 
Game Localization in Python
Game Localization in PythonGame Localization in Python
Game Localization in PythonWalter Liu
 
Service production from d3 pitfall viewpoint
Service production from d3 pitfall viewpointService production from d3 pitfall viewpoint
Service production from d3 pitfall viewpointWalter Liu
 
Celery in the Django
Celery in the DjangoCelery in the Django
Celery in the DjangoWalter Liu
 

More from Walter Liu (18)

Generative AI 在手機遊戲發行上的應用介紹.pdf
Generative AI 在手機遊戲發行上的應用介紹.pdfGenerative AI 在手機遊戲發行上的應用介紹.pdf
Generative AI 在手機遊戲發行上的應用介紹.pdf
 
Infrastructure as code using Kubernetes
Infrastructure as code using KubernetesInfrastructure as code using Kubernetes
Infrastructure as code using Kubernetes
 
手機遊戲數位行銷工具淺談
手機遊戲數位行銷工具淺談手機遊戲數位行銷工具淺談
手機遊戲數位行銷工具淺談
 
關於第三方追蹤廣告再行銷的那些事兒
關於第三方追蹤廣告再行銷的那些事兒關於第三方追蹤廣告再行銷的那些事兒
關於第三方追蹤廣告再行銷的那些事兒
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Using Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCPUsing Kubernetes to deploy Django in GCP
Using Kubernetes to deploy Django in GCP
 
Game DDOS Prevention
Game DDOS PreventionGame DDOS Prevention
Game DDOS Prevention
 
Airflow - a data flow engine
Airflow - a data flow engineAirflow - a data flow engine
Airflow - a data flow engine
 
Super Fast Gevent Introduction
Super Fast Gevent IntroductionSuper Fast Gevent Introduction
Super Fast Gevent Introduction
 
HTTP/2 to web dev
HTTP/2 to web devHTTP/2 to web dev
HTTP/2 to web dev
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 Introduction
 
Consul - service discovery and others
Consul - service discovery and othersConsul - service discovery and others
Consul - service discovery and others
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Salty OPS – Saltstack Introduction
Salty OPS – Saltstack IntroductionSalty OPS – Saltstack Introduction
Salty OPS – Saltstack Introduction
 
Django deployment and rpm+yum
Django deployment and rpm+yumDjango deployment and rpm+yum
Django deployment and rpm+yum
 
Game Localization in Python
Game Localization in PythonGame Localization in Python
Game Localization in Python
 
Service production from d3 pitfall viewpoint
Service production from d3 pitfall viewpointService production from d3 pitfall viewpoint
Service production from d3 pitfall viewpoint
 
Celery in the Django
Celery in the DjangoCelery in the Django
Celery in the Django
 

Recently uploaded

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

WRS GIT Branching Model - draft

  • 1. By Walter Liu WRS GIT branching model (draft)
  • 2. Agenda 》 GIT Branches 》 How to work 》 Others × Purpose behind × Misc – Tips × Misc – Troubleshooting × RPM repo × Versioning
  • 5. Private Personal Branch 》 Name: <account_name> 》 Set git remote branch to this 》 For developer daily work. 》 Promote to dev branch 》 Pull updates from dev branch
  • 7. Develop branch (2/2) 》 Name: dev 》 Require functional and unit test ready. 》 It’s best to have CI. 》 For dev build. 》 Promote to master branch 》 Update from × Private branch × Feature branch × Hotfix branch
  • 8. OUR master branch 》 Name: 1.0, 2.0 ….. 》 Promote source from dev branch. 》 Release staging-candidate build. × At the same time, tag it with release version. 》 Update from × dev branch × hotfix branch
  • 9. Feature Branch 》 Name: feature_<Feature_name> × Example: feature_odin_authentication 》 Scenario: × Feature that impact integration test › Example: odin_authentication. × Big feature × Big project with many people 》 Promote to dev branch 》 Pull update from dev branch
  • 10. Hotfix branch 》 Prefix: × hotfix-<TT_number>- <TT_number>..... 》 Scenario × If your dev branch is working on something. 》 Pull from master branch 》 Promote to × master branch(s) × dev branch *Remember to prompt code to master and dev at the same time.
  • 12. So, how should we work. 》 For developers, × Project start › Create remote private branch. › Set git remote branch to your private branch. × Work on it, daily push source to private branch. × Once finish a feature and it’s unit/functional test. Push to dev branch. 》 For RD lead, × At project start, notify team members the git guidelines. × START A NEW GIT PROJECT, see next slide × [Recommended] Setup CI on dev and master branch. × Use dev for developer development and test. × For release a new build to OPS or staging test. › Ensure the code quality is good enough. › Promote code from dev to master branch. › Git tag and master with release version.
  • 13. Start a new git project 》 Create 1.0 or 2.0 .... For release × Set it protected 》 Create dev branch 》 Set default branch to dev 》 Remove master branch
  • 16. Create a new remote branch and track it locally 》 “Create branch on gitlab” or 》 git fetch origin 》 git branch --track <branch> origin/<branch> 》 git checkout <branch> OR # -b create new branch from dev branch 》 git checkout –b <new_branch> dev # -u ,push source to remote and setup tracking 》 git push –u origin <new_branch>
  • 17. Update source from dev branch to private branch 》 git checkout <private_branch> 》 git pull 》 git merge dev 》 git push OR 》 git pull origin dev <private_branch>
  • 18. Promote source from private branch to dev branch 》 git checkout dev 》 git pull 》 git merge <private_branch> 》 git push OR 》 git push origin <private_branch>:dev
  • 19. Promote source from dev branch to master branch 》 Similar to last page OR # make sure local dev branch updated #  git pull origin dev 》 git push origin dev:master
  • 20. Promote source from hotfix branch to dev/master branch # make sure local dev branch updated # git pull origin hotfix-<..> 》 git push origin hotfix-<..>:master 》 git push origin hotfix-<..>:dev
  • 21. Git tag 》 When, × Release a build from master branch 》 Format: v<version> 》 Command × git tag –a <tag_name> × Use gitlab to tag. (easier) 》 Integrated in CI is recommended.
  • 23. Purposes behind 》 Private personal branch × Daily push to remote (HD broken) × Lazy to switch branch (:P) 》 Tagging × Tag release version on master branch for easier trace back and troubleshooting. 》 Why 1.0, 2.0 branch? × For module development
  • 24. Misc - Tips 》 Rebase  Merge 》 No-fast-forward for feature branch commit to dev branch. 》 For bug fixes × Use interactive rebase to squash commits into one. × Easier to › code view › Traceback/troubleshooting
  • 25. Misc – Troubleshooting Check local/Remote branch 》 git branch –a Remote repository status 》 git remote show origin
  • 26. RPM repo 》 dev branch build to dev-repo 》 1.0/2.0… branch build to int-repo 》 QA promote a rpm from int-repo to stg-repo 》 OPS promote a rpm from stg-repo to prod- repo
  • 27. Versioning 》 dev branch and master branch should use different version. 》 Since they put into different rpm repos, it’s not required to use different formats.
  • 29. Q & A

Editor's Notes

  1. dev -> dev build Master -> int build E2E test (int build)  [move int build to] staging build Or dev -> dev build Master -> staging build (E2E test, this more like staging-candidate. Need tagging)
  2. In a big project, dev branch needs to be more conservative: feature that need many people work with.
  3. git update-ref: Change default branch after clone a repo.
  4. Lazy to switch branch Most of time, we’re working on one thing only. Versioning Add git commit [X] Sep
  5. For troubleshooting
  6. Different version means they should not be continuous versions.