Git workflow for a small team of developers and designers

I get lost with the Git branch model and the workflow that I want to create for my team (developers + designers).

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

Models /
Controllers /
Views /

Developers work on parts of M and C with some basic / generated views (e.g. Rails, Django or CakePHP) and designers work on part V

How can I control that developers work on M&C and retain some basic crap representations, while at the same time designers make sexy looks based on the actions of controllers encoded and added by developers gradually?

I tried to get it to work with three branches:

master (ready for production)
Dev
ui

but I don’t know how a designer working in the ui branch can save the code in a different place than / views, updated the working application ...

Thanks to the people for the help!

+6
git workflow ruby-on-rails model-view-controller cakephp
source share
4 answers

With git, there is no reason for developers to work on a separate branch or mock views. Let designers and developers work in the same branch, on the same code base. When the view is executed (or at least improved and not crashing), the developer commits and inserts them into the main repository. The same is true for developers: when a local change is β€œdone”, ask them to commit it and click.

Before you press, each side must pull (so that there are no conflicts). If two groups work in mutually exclusive code fragments (separate files or even separate parts of the same files), then pull will simply update the local copy and everything will work fine.

At the same time, both sides always see the most modern code base and make a direct contribution to achieving the ultimate goal by observing its evolution.

+8
source share

Git is so easy to use that there is no reason why everyone should not have their own branch. Damn, this is one of the main reasons for using a version control system. Git commits are cheap.

As a rule, we have a wizard, and anyone who works with updates or functions will be separated from the master and, if necessary, a branch branch, then the release wizard (someone like me) will take care to merge them back, check conflicts, release testing and merging with the master.

When you work on this, others can get your changes by pulling / pulling along your branch to make changes.

+4
source share

Git is not magic. This prevents your designers from using code that developers are actively writing. Developers still have to write, test and pass on their code, as well as click on it some place from which developers can pull it.

As a rule, you will have a β€œbare” repository in which all parties will push their work when it is ready for sharing. Everyone else is pulling this job. Designer's work can be the work of the developer and merging the dev branch into the ui branch, for example:

git checkout ui git fetch git merge dev 
+3
source share

If you really want to use things like branch and path permissions, I suggest you check out gitolite

This will allow you to control access at all levels.

0
source share

All Articles