Skip to content

Instantly share code, notes, and snippets.

@jmaziarz
Last active August 29, 2015 14:03
Show Gist options
  • Save jmaziarz/5bf1017dccfa58d04d2a to your computer and use it in GitHub Desktop.
Save jmaziarz/5bf1017dccfa58d04d2a to your computer and use it in GitHub Desktop.
Gitlab customized production workflow
Given:
$ git branch -a
production
* master
remotes/origin/5-4-stable
remotes/origin/6-0-stable
remotes/origin/6-1-stable
remotes/origin/6-2-stable
remotes/origin/6-3-stable
remotes/origin/6-4-stable
remotes/origin/6-5-stable
remotes/origin/6-6-stable
remotes/origin/6-7-stable
remotes/origin/6-8-stable
remotes/origin/HEAD -> origin/master
remotes/origin/docker
remotes/origin/is-it-amr
remotes/origin/master
remotes/origin/omnibus
# fetch all new branches and changes from upstream
$ git fetch
# create new local branch where merging and testing happens
# based on the current production branch
$ git checkout -b [version]-test production
# merge latest stable, resolve any conflicts, commit as
# needed, and test (ideally on provisioned test machine or
# Vagrant box)
$ git merge origin/[version]-stable
# merge new production ready code into production branch
$ git checkout production
$ git merge [version]-test
$ git push
# deploy (TBD)
# cleanup (if necessary)
$ git branch -d [version]-test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment