Skip to content

Instantly share code, notes, and snippets.

@weierophinney
Created September 14, 2012 20:01
Show Gist options
  • Save weierophinney/3724354 to your computer and use it in GitHub Desktop.
Save weierophinney/3724354 to your computer and use it in GitHub Desktop.
proposed workflow
We rename "master" to "develop"
We rename "release" to "master"
Thus "master" stays the default branch, which means most PRs will be made
against it.
Bugfixes are merged to:
- master
- develop
Features are merged to:
- develop
When develop looks like the next minor or major version:
- create new release branch, release/X.Y.0, from develop branch
- once stable, merge release/X.Y.0 to master, and delete release/X.Y.0
- bugfixe branches merged to release/X.Y.0 are also merged to develop
To merge a bugfix:
git checkout -b hotfix/somename master
git pull ....
verify...
git checkout master
git merge --no-ff hotfix/somename
git checkout develop
git merge --no-ff hotfix/somename
To merge a feature:
git checkout -b feature/somename develop
git pull ....
verify ....
git checkout develop
git merge --no-ff feature/somename
@Maks3w
Copy link

Maks3w commented Sep 14, 2012

I prefer this, more easy.

Also can be interested put this workflow in the README and move the changes to a CHANGELOG file

@Maks3w
Copy link

Maks3w commented Sep 14, 2012

Hint: git pull upstream refs/pull/<PR NUMBER>/merge

@petervanderdoes
Copy link

Sounds like a git-flow workflow :) I create a batch of git helpers to speed up this workflow, https://github.com/petervanderdoes/gitflow You can check the wiki for all the commands.

It's a fork of the original git-flow workflow but added improvements and new features, like hooks and filters. You can see some sample on how to use them in the gist I created for the git-flow development: https://gist.github.com/2878492

If you want more info about how to use git-flow, let me know and I'll send you my email, I'll happily help you out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment