What would be the easiest way to use git correctly in a small team of about 5 developers, with one server running the live application?
I suggest you to create some branch:
Production branch is "live" branch. Is the application in use right now.
When an update is needed, a developer can pull master branch into local branch. Than, can start to code. At the end, just pull and push from developer local branch to master. A Project manager can take a look in master branch. Test it. And when ready, can merge production with master. And now you'll have new software.
Start simple and build up to a more complex workflow as and when you need to.
Whatever you do, don't let A successful Git branching model be the first thing people see, it will only confuse and overwhelm them. Look at this later when you have more experience.
I would suggest that you start with a central
git repository and have everyone, including your production and test builds clone from that.
Within your git repository, create a
production branch and a
Developers should work in their own local or remote feature branches until they are completed and merged into
master. From here they can be merged into the
test branch for deployment into the test environment and when they pass the tests they can be merged into the
That way you can always see what is new and untested, what is tested but not yet deployed into production and what is actually in production.
We've got a similar situation -- except we have dozens of web apps not one. We've been successfully using A successful Git branching model for the last year or so with no significant complaints.
You must have one master repository on integration server and each developer must clone it. After it just do pull and push. Develop new big features in separate branch. No rocket science here. On live server - you also must clone master repository. And it's good practice to have branch like "live" for it.