August 18th, 2012, 04:45 PM
Does anyone know how to setup a git repository on the live home web directory of my web server and 'connect' it to my eclipse IDE? I want to work on the project on eclipse and push commits I make on eclipse to my web server and have the committed files show up as a web site.
Before you say it, git is the most non intuitive version control system I've encountered. I've been reading documentation after documentation on this for a week now and even lost some sleep. Its really not easy to do.
August 19th, 2012, 09:44 AM
Here is probably how I would do it:
Create a new repository on your web server; "git init" I think is all you need to run. Place the repository in the place where you want your files to show up. Also, when hosting a repository like this you'll want to be sure to configure your web server to block access to the .git directory to prevent leaks of your source code.
You can clone your repository from your local machine over SSH. The clone URL will be something like git://firstname.lastname@example.org:/absolute/path/to/git/repository This path is not the relative path served by your web server. ie: if your repository it at the root of your web server's document root, you would not enter / here, you would still enter /var/www or whatever directory on the server is the web server's document root.
Once that's set, you should just be able to pull and push changes between the two repositories.
You'll still have to run manual commands on the web server copy to update it when you push a change. For safety reasons, by default GIT will not allow you to push to a branch that is currently checked out on the receiving repository. For this reason, you would normally set up your two repositories in the opposite way: have your live-server copy be a clone of your development copy and run a pull from the live-server to update it.
Very few people would disagree with you on that. I would find it difficult to design a version control system with a more difficult to use interface.
August 29th, 2012, 04:46 AM
I dont know what is git repository..please anybody tell me about it...