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.
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
from the popular git branching model.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With