0

I have a codeigniter application that is fully covered by git and i have it hosted on a shared hosting of hostgator. I have the limited shell access in hostgator and hence i updated the files by pulling from the git to the server directly. So far so good because i was just having it on a test directory.

Now i wanna move it to production. So the app must reside in http://www.domain.com hence the files must be in public_html. But when i clone from git into the public_html it comes along with a directory called production as the root, since thats the name of the repo. So in codeigniter config i have to set domain.com/production/ as my base_url which will have all urls with production and i dont want this to happen. So how do i point all default request to the production directory, but without having that extra segment in the url.

Is this something that i have to do in the .htaccess file or the codeigniter routes. or is there someother better way of doing this.

UPDATE

I already have some files in the public_html directory and i cannot lost them, so having a "." in the clone wont work. Any other ideas how i can do it.

swordfish
  • 4,899
  • 5
  • 33
  • 61

1 Answers1

1

Am i understanding this correctly. You have folder which represents the repo name in your server..

The solution is how you clone it. Do something the following

cd public_html

git clone <repo-name> .

Take note of the period at the end which refers to current directory

Josnidhin
  • 12,469
  • 9
  • 42
  • 61
  • the directory already has some other files which i cannot remove. How do i, clone into an existing directory which is already having some files. – swordfish Oct 23 '11 at 21:35
  • @swordfish, take a look at this question: http://stackoverflow.com/questions/2411031/git-how-do-i-clone-into-a-non-empty-directory – JackWink Oct 23 '11 at 22:07