Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using git as a better SVN

We were an SVN shop - now we use git (cos all the cool kids are doing it).

Each dev checks in code locally on their own git tree while working on new features. When some work is ready to submit to the main repository we have a directory on a shared drive for each project. We then do a git push to that repo, and either a git sync or git pull to update an individual dev machine from the 'one true source'.

We had one accident when someone did a push to the repository and somehow managed to replace the main repo with the dev machine's version of it's own git tree.

Is this the best 'git' way of doing things?

We are on two sites but the shared directory is common. A small number of devs who can generally avoid major clashes on the code area. All on Windows, using TortoiseGit, security is not too important but we have no admin support so a complex server solution is out.

like image 761
Martin Beckett Avatar asked Jan 20 '23 14:01

Martin Beckett


2 Answers

Git is powerful. It is distributed, but doesn't restrict you from being a centralized, if you want to.

Unlike in svn tho', it is very essential to setup your own conventions and ways of doing stuff.

A very good model to follow would be illustrated in the diagram below enter image description here

from the popular git branching model.

like image 61
lprsd Avatar answered Jan 27 '23 05:01

lprsd


Take a look at the workflows at the following link with my preference being the integration manager workflow (similar to @simon's second option) and correlative to github's model: http://progit.org/book/ch5-1.html

like image 43
Jed Schneider Avatar answered Jan 27 '23 07:01

Jed Schneider