user1058712
user1058712

Reputation: 417

Git for web development

I would like to use git for my web development.

I already have some ideas how to use it but there are still some questions that I have.

First I want to show you my production envoirment. I have a web server on a shared hoster. That means I only have FTP access to it. I have a linux server that is my git server. (bare repo) And I develop with a windows workstation with eclipse.

The main idea that I have is that I develop on my workstation where I have xampp to test my changes (commits). When I am happy with my changes I will push it to my bare repo. This will than update my web server.

Ok to do that I want to use different branches. That means that I want a "Live", "Hotfix" and "Future" branch. Live: Every change should be available online on the web right after pushing. Hotfix: Here I want to make changes and push to the bare repo and if everything is ok I want to put this online later. Future: This are for changes that may be added or not in the future.

The first problem I have is how to configure the branches on my bare repo to work like this.

The second problem that I have is that I only have FTP access. I found 2 ways get this working. 1: Use of git-ftp (there are 2 versions) 2. Mount FTP as a drive. My problem here is that I have some web apps like typo or shop systems that have cache files or can change some files.. So I only want to upload the changes I have made. I don´t want to overwrite everything. Maybe I have to sync the files from my webserver before uploading the changes but I don´t know how to find a good solution for that.

Maybe someone hints how to do that :)

Upvotes: 0

Views: 1358

Answers (1)

Adam Dymitruk
Adam Dymitruk

Reputation: 129526

I would take a look at heroku and appharbour for being able to "live publish". This takes away the need for FTP.

Secondly, you may want to look at "git flow" for branch management.

Or if you want to go crazy, you can do proper branch-per-feature if you are disciplined with small features and frequent integration: https://plus.google.com/109096274754593704906/posts/R4qkeyRadLR (read the comments too. Some very good discussion there)

Upvotes: 1

Related Questions