News for hackers. Stuff that matters.
Re:Understanding the Git Workflow by joelhaasnoot on Sunday July 31, 2011 @01:44PM (#2828952)
Hmm, this makes sense to me: lots of Git features I'd forgotten or not used before.

Can anyone sketch my "merging" strategy I should be using in my scenario: - Have 3 branches dev, stage and master - Bugs are fixed on master, bigger bugs/changes on stage and new features on dev - Big functionality changes/additions come in the form of new branches, which currently I first merge with dev, then with stage and if everything is OK, with master. This doesn't always work well due to the timing of things: sometimes my dev branch is out of date with the master and needs fixes from the master before applying.

How should I handle merging the branches?

Re:Understanding the Git Workflow by cvandyck76 on Sunday July 31, 2011 @01:53PM (#2828980)
I wouldn't have two separate branches for bugfixes and then one for new features - as you noted, it can get hairy. Personally I find the git-flow model very straightforward.

Do normal feature development and bug fixes on the develop branch; save master for production releases. When it's time to make a release, cut a release branch (e.g. r/1.0.1) from the develop branch. Bug fixes that are made on that branch should also be merged into develop. Once the release is made, merge r/1.0.1 back into master and develop and continue on as normal.

Also see: https://github.com/nvie/gitflow

Re:Understanding the Git Workflow by joelhaasnoot on Sunday July 31, 2011 @02:20PM (#2829058)
The problem is that between a feature being ready and it going into production there is a certain amount of QA/tweaking that goes on. Before I was running into issues where I couldn't fix a much smaller bug than the new functionality due to not having a branch for that. The flow handles that with hotfixes, which I guess works well.

I do think the numbering is excessive however: web software releases so often on a one man team it's mostly extra work.

Re:Understanding the Git Workflow by mark_story on Sunday July 31, 2011 @08:32PM (#2830156)
I would create feature branches for anything bigger than a few commits. Once the branch is done, you can merge it into dev, then merge that same branch into stage/master if you want.

Typically I would try to merge feature->dev->stage->master. With issues found on stage those could be put directly onto stage and merged into master. I guess it depends where you base new branches off of and where the 'stable code' is.

I usually aim to merge less stable (softer) branches into more stable (firmer) branches. And base all new feature branches off of the most firm branch I have.