Skip to content

Git Workflow Sample

metaory edited this page Sep 24, 2022 · 5 revisions

Sample config

sample-generated-config-file
config_version: 0.45.0
graph_git_log_limit: 40
issue_tracker_path: https://metaory.atlassian.net/browse/{taskId}
sleep_between_commands: 1000
workflows:
bugfix:
  branch: '{branchType}/{taskId}-{description}'
  steps:
    - git fetch origin
    - git checkout master
    - git merge origin/master
    - autocomplete checkout flight
    - git checkout -b {branchName}
    - git status
    - confirm git push --set-upstream origin {branchName}
    - list logs
feature:
  branch: '{branchType}/{taskId}-{description}'
  steps:
    - git fetch origin
    - git checkout master
    - git merge origin/master
    - autocomplete checkout flight
    - git checkout -b {branchName}
    - git status
    - confirm git push --set-upstream origin {branchName}
    - list logs
flight:
  branch: flight/{description}
  steps:
    - git fetch origin
    - git checkout master
    - git merge origin/master
    - git checkout -b {branchName}
    - git status
    - confirm git push --set-upstream origin {branchName}
    - list logs
hotfix:
  branch: '{branchType}/{taskId}-{description}'
  steps:
    - git fetch origin
    - git checkout master
    - git merge origin/master
    - git checkout -b {branchName}
    - git status
    - confirm git push --set-upstream origin {branchName}
    - list logs
other:
  branch: '{branchType}/{taskId}-{description}'
  steps:
    - git fetch origin
    - git checkout master
    - git merge origin/master
    - autocomplete checkout flight
    - git checkout -b {branchName}
    - git status
    - confirm git push --set-upstream origin {branchName}
    - list logs

TL;DR

The Default configs

branch create from can sync from branch name
flight master master flight/{description}
hotfix master master hotfix/{taskId}-{description}
feature flight parent flight feature/{taskId}-{description}
bugfix flight parent flight bugfix/{taskId}-{description}
other flight parent flight other/{taskId}-{description}

Hotfix branch:

  • Can only be created from master
  • While branch in active, can sync from master
  • Cannot take pull from dev
  • Should not take pull from another feature / flight / hotfix branch

Flight branch:

  • Will only be created from master
  • Can sync from master
  • Cannot sync from dev

feature/bugfix/other in Flight (Child branch -> Flight branch):

  • Task branches (feature/bugfix/other) should be created from the Flight branch
  • Cannot take pull from any branch but Flight branch
  • Can take pull from a sibling branch of the same flight if it depends on it

Flights(trunk)

  • flight is for the features, bugs, and improvements corresponding to the flight (epic) in the BugTracking system
  • Ticket branches can be created from a flight branch.
  • There are 3 ticket branch prefixes: featurebugfix, and other. These branches require a BugTracking task ID in their names.
  1. feature is for the small packed features inside the flight.
  2. bugfix is for the fixes and issues related to the flight.
  3. other is used for non-technical issues like documentation or infrastructure improvements, etc.

Hotfix

  • hotfix is dedicated to fixes regarding critical issues in the production environment.

Clone this wiki locally