OpenShine git workflow
Today i would like to explain to you about the git workflow that we follow at OpenShine. As you know, git is a wonderful distributed version control system developed by the linux kernel team. This tool is used by many Free software projects as for example : gnome.org freedesktop.org kernel.org .
For a year , maybe more, we’ve been using git for our projects. The experience has been good, but in the beginning was a little bit complicated. The main problem was the git learning curve. If you has been using svn or cvs, the change to git is a little bit complicated because there are new concepts to learn about how to work with different repositories . So we thought it would be necessary to create a workflow for make easier our work.
I started reading documents, articles, books about git and git workflows. There are a lot of information about it , so I took ideas from here and there and i draw it with inkscape. While we work, we discussed the workflow and fixed it if necessary. And the final result was this (now released under CC-BY-SA ;) )

Available in png, pdf, svg formats. And you can fork it in this repository .
The diagram has two parts, left side shows the git workflow and the right side is the explanation of the workflow steps. In the initial situation, we’ve a repository (osproject at openshine) that we want to add a feature or fix a bug.
So the workflow is as follow :
- Fork a project in github, and this fork will be stored in your github account. To “fork” a project in github means to create a clone of this project.
- Clone the project fork, that you create in the 1st step, in your computer.It’s really useful adding the upstream repository as remote (the repository from you forked in the 1st step).
- Keep updated your repository from upstream whenever possible.
- Create a branch with the feature’s name or the bug id and description. Something like add-new-configuration-window or main-window-error-57 …
- Develop & commit, develop & commit …..
- Check if your branch is updated from upstream.
- Feature complete !!
- If you want to push all your commits check 8th step in the diagram
- If you want to push all your commits but in a single commit, check 9th step in the diagram
- Now you’ve you branch in your github account. The last step is ask to the upstream developer if you can merge your branch in upstream. So, press “Pull request” button. When your changes will be accepted by the upstream maintainer you can remove your branch stored in your github repository with “git push origin :branch-name”.
The Maintainer workflow is about how to merge branches from the point of view of upstream. But in the new version of github is not necessary in most of cases because you have a “Merge” button.
And finally … some useful links :
- GIT homepage
- GIT documentation
- github : public git service
- gitorious : public git service and opensourced server.
- OpenShine github organization
- OpenShine git workflow : png, pdf, svg
- OpenShine workflows repository