Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git workflow for a small team of developers and designers

I'm getting lost with Git branching model and the workflow that I want to create for my team (developers + designers).

Suppose that the project is based on a MVC pattern, so we have a structure similar to :

Models/
Controllers/
Views/

Developers works on the M & C parts with some basic/generated views (Rails, Django or CakePHP app for example) and Designers works on the V part

How can I manage that developers works on M&C and keep some basic crappy views, and in the same time, designers make sexy views based on controllers actions coded and added by developers progressively ?

I tried to make it works with 3 branches :

master (production-ready)
dev
ui

but no idea how a designer working on ui branch can keep the code elsewhere than /views updated an a working app...

Thanks folks for help !

like image 689
revohsalf Avatar asked Dec 02 '10 14:12

revohsalf


People also ask

What is your preferred Git workflow when developing collaboratively?

The Centralized Workflow is a great Git workflow for teams transitioning from SVN. Like Subversion, the Centralized Workflow uses a central repository to serve as the single point-of-entry for all changes to the project.

What Git workflow is used by teams that collaborate?

This process for collaboration works well with the popular workflow model, GitFlow. If you are already very familiar with GitFlow, you should still read the first section in this chapter on establishing and documenting your team's procedures.

What is a typical Git workflow?

Typical Workflow are as followsGet local copy of code. Create a branch. Edit files. Add and commit changes to local machine. Get back in sync with changes commited by others.


2 Answers

With git, there's no reason for developers to work on a separate branch or to have mocked up views. Have designers and developers work in the same branch, on the same codebase. When a view is done (or at least improved and not crashing) have the designer commit and push them to a master repository. The same is true for developers: when a local change is 'done', have them commit it and push it.

Before pushing, each side needs to pull (to ensure there are no conflicts). If the two groups are working in mutually-exclusive pieces of code (separate files or even separate parts of the same files), then the pull will simply update the local copy and all will work well.

With this, both sides are always seeing the most up-to-date codebase, and contributing directly towards the exact end goal, watching it evolve.

like image 163
Phrogz Avatar answered Sep 24 '22 21:09

Phrogz


Git is so simple to use, theres no reason everyone should not have their own branch to work out of. Hell, thats one of the main reasons to use a version control system. In Git, commits are cheap.

Typically, we have a master, and anyone who is working on updates or features will branch from the master and branch a branch if need be, then a release master (someone like me) will take care of merging them all back down, checking for conflicts, testing the release and merging back to master.

As you work on it, others can receive your changes by doing a fetch/pull against your branch to pull in the changes.

like image 27
Kevin Avatar answered Sep 21 '22 21:09

Kevin