I have:
- Mac OS X
- web app being developed using PHP, etc
- basic git knowledge ;)
- remote hosting server with WebDav access
- possibility to manage server files using local git binary via Terminal and WebDav
I don't have:
- git installed on my remote server
- ssh access to my remote server
What I do now?
- Develop my app locally.
- Mount remote server as volume using WebDav (remote files behave like "normal" files in MacOSX)
- Copy and replace (upload) my web app to remote server using normal OSX functionality.
What I want to do?
- Track my web app files using git (git init,add,commit works well as for now)
- Deploy (upload) my web app to the server using git and WebDav.
What is the best way to achieve these goals? I am able to use local binary of git app on remote files using Terminal and "cd"-ing to them thanks to the mounted WebDav volume. What's next? Do I set up a "git remote" on my local repo and then push changes to the server? Or maybe vice versa, I set up a git remote on my server repo and pull changes from my local repo?
I imagine that I could for example have two deployment directories on the server, one that I push a stable branch to (public accessed website version) and the other one for testing purposes ("unstable branch"). I could easily return to an older version of website if something doesn't work using git...
Thanks in advance for your help, I promise that I tried to find a good solution myself, but didn't find anything that would answer all my questions.