Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Together with a friend we are looking to develop a website (using Symfony2). We are on a Shared Hosting with SSH access.

Below is the environment we'd like to setup:

* Use git as Version Control (we are new to Git)
* Share the tasks and develop on our local machines
* Push the updates onto the remote server

Here's our initial thoughts on how to do it (assuming Git is already running both locally and remotely):

* Install Symfony on the Remote Server (basic setup)
* Get a clone (using Git) of the project locally
* Develop project locally and push updates (using Git) on the remote server

Does this approach make sense, if not, any recommendations?

Thanks

share|improve this question
    
Please do not cross-post. –  danlefree Mar 28 '12 at 20:12
add comment

closed as off topic by danlefree Mar 28 '12 at 20:13

Questions on Webmasters Stack Exchange are expected to relate to webmastering within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

I personally use Git for web development, and have adopted a method similar to this with our development server. I used Joe Maller's Web-Focused Git Workflow as a model, and it's been fairly successful.

Joe's approach uses an intermediary "hub" repository that's been set up as a "bare" repository (git --bare init), because it's very tricky pushing into a working repository. Git seems much more happy when you pull from other repositories, which is why you'll hear a lot about "pull requests" in community projects.

From there, the dev server (or in your case, your shared hosting) is updated using post-commit and post-update hooks that pull the changes in from the hub repository. This allows your team to push changes upstream into the hub, and automatically update your shared hosting account from the same repository.

You might have to modify it a bit to match your environment, but I think it would accomplish everything you're looking for.

share|improve this answer
1  
Thanks for the link, good read. –  bikedorkseattle Mar 28 '12 at 18:56
add comment

As stated by @Jacob Hume I'd have an intermediary repository, setup your own, use Github or Bitbucket. You are likely going to run into difficulty synchronizing your branches between multiple developers if you don't use a hub. I usually pull updates into a staging/testing server to make sure everything is working, then do the same for production.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.