DEV Community

Which is the right git workflow for my next project?

AbdulBasit KABIR on May 11, 2017

So you want to adopt git to version your current or next project. There are quite a number of ways you to go about it and even collaborate with o...
Collapse
 
aurorema27 profile image
Aurore Malherbes

Thanks for this clear article !
Few months ago I wrote an article about how to applied the feature branch workflow when several teams are working on the same product along with the Scrum methodology :)
theodo.fr/blog/2016/09/push-to-pro...

Collapse
 
abulkay profile image
AbdulBasit KABIR

I really enjoyed reading your article. From your article, it seems like every feature branch also has sub-branches. Was this done so that multiple developers can work on the same feature?

Collapse
 
derwinmcgeary profile image
Derwin McGeary

Thank you: I really enjoyed this article - so logically delineated!

I have seen teams struggle with a model somewhere between feature and developer branches, and I couldn't explain what seemed hinky about it. I personally like the issue branch workflow, because it focuses my attention on the one task.

Collapse
 
abulkay profile image
AbdulBasit KABIR

I'm glad you enjoyed it.

Could you describe how they go about it in the model you mentioned?

Collapse
 
shellbryson profile image
Shell Bryson

I find git flow scales well - from personal single-dev projects to larger multi-dev. It tends to be my default whenever starting out a project.

Collapse
 
abulkay profile image
AbdulBasit KABIR

I'm curious how you use git flow on a single-dev project.

Collapse
 
chrischarabaruk profile image
Chris Charabaruk

I've done it, and it's no different than on a multiple-dev project. You're still keeping each feature, fix, etc. on their own branches that you merge into master or develop branch when ready. It's just that there's nobody else doing the same thing on your repo.

Thread Thread
 
abulkay profile image
AbdulBasit KABIR

That makes a lot of sense. So you'll be tracking what types of changes each unit of work introduces.

Collapse
 
abulkay profile image
AbdulBasit KABIR

I've seen this (feature/issue type workflow) although branches didn't get the feature's name. Every branch is created from an issue on the issue tracking system then prepend the task type(feature|hot-fix|update|fix) to get a branch name(e.g hot-fix/DCS-458). This helps in tracking what types of issues are worked on mostly, who makes the most bug fixes, where the branch is to be merged into, etc.

Collapse
 
maxx0r profile image
Max

I work in a team and we always use the git flow paradigm. Works perfect for us

Collapse
 
abulkay profile image
AbdulBasit KABIR

Yes, the git flow workflow (or feature branch workflow as is in the post) is quite popular with teams. But it isn't always the best choice for all projects irrespective of the team size.

Collapse
 
maxx0r profile image
Max

No, but we only do larger projects. Even with smaller projects it has its advantages. Having only 1 branch should never be an option in my opinion.

Thread Thread
 
abulkay profile image
AbdulBasit KABIR

Of course, Except for very simple projects, a single branch is never ideal.

Collapse
 
mdabek profile image
Marek Dabek

Really nice summary.
The only thing I am missing here is a remark on how to use tagging. I am always amazed when I see a project which is not using tags to mark the stable releases.

Collapse
 
abulkay profile image
AbdulBasit KABIR

Yh, good point.
Tagging is very key especially for marking releases on large projects.