Skip to content

ptrkdan/git-flow-sandbox

Repository files navigation

git-flow-sandbox

Installation

Install git flow using the following command.

brew install git-flow
sudo apt-get install git-flow

Initialization

In order to use git flow in your repository, you must first initialize it. This is required for every development environment.

git flow init

Set the following during initialization:

Branch name for production releases:
> staging

Branch name for "next release" development:
> dev

Feature branches? [feature/]
> n/a (default)

Release branches? [release/]
> n/a (default)

Hotfix branches? [hotfix/]
> n/a (default)

Support branches [support/]
> n/a (default)

Version tag prefix []
> n/a (default)

Feature Development

  1. Start a feature branch.
git flow feature start feature-name
  1. Develop, commit, push, and create a PR.

[!NOTE] You may also use git flow feature publish feature-branch to push the local feature branch to the remote repository.

  1. Once the PR is reviewed and approved, merge to dev.

[!WARNING] Running git flow feature finish feature-branch will merge the feature branch without creating a pull request, so avoid using it.

Release

Dev → Staging

  1. Ensure that the local branches are updated.
git pull --all
  1. Start a release branch.
git flow release start release-version
  1. Make final changes, such as updating versions, and commit.

  2. Finish the release

git flow release finish release-version
  1. Back-merge to dev
git checkout dev
git merge staging
  1. Push updates to remote
git push origin staging dev --tags
  1. On GitHub, create a release from the created tag.
  2. Select the created tag, then generate the release notes.
  3. Check "Set as a pre-release".
  4. Publish release.
  5. Approve workflow run.
  6. Verify deployment on staging.

Staging → Production

  1. Merge staging into main.
git checkout main
git pull                     # Ensure that main is up-to-date
git merge --ff-only staging  # Include tag set in staging release
git push origin main --tags
  1. On GitHub, update the release to a full release (uncheck "Set as a pre-release").
  2. Approve workflow run.
  3. Verify deployment on production.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors