Giter VIP home page Giter VIP logo

customized-git-workflow's Introduction

Customized Git Workflow

Situation

  • Every feature should have their own developing branch.
  • Some features had been developed but not going live soon until the idea has been approved by marketing team member.
  • Website needs to be updated and deployed as fast as possible.

Git flow preview

git flow preview

Legend

  • Prod. branch refers to official website.
  • Stage branch refers to stage website for for reviewing purposes by other team members.

Idea

  • First step is always checkout a new branch from master.
  • Run git rebase prod-branch before merging feature branch into stage branch or prod. branch.
  • Don't directly merge stage branch into prod. branch.
  • You can treat stage branch as a pre-prod. branch, but one thing you should be noticed that not all features which has been merged into stage are becoming part of our official release.

SOP

Merge feature to stage

When I develop a feature on branch feature

1. Rebase prod first

git checkout feature
git rebase prod

2. Checkout stage and run merge

git checkout stage
git merge feature

Merge feature to prod

When I develop a feature on branch feature

1. Rebase prod first

git checkout feature
git rebase prod

2. Checkout stage and run merge

git checkout prod
git merge feature

Note

  • If you want to update remote existing feature branch after local feature branch has been rebased to prod, you may bump into an error. You may want to use replace remote branch with your local feature branch. Please run:
git push --force origin feature

Ref.: Git push rejected after feature branch rebase - Stack Overflow

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.