Welcome Guest, Not a member yet? Register   Sign In
Proper way to deploy from Git. (Local -> Remote Git -> Live server)
#1

(This post was last modified: 01-13-2017, 08:32 PM by radiantMemory.)

So I'm programming using the CodeIgniter framework. I was wondering the best way to go about deployment to the live server.
My question stems from the default .gitignore.

If I add and commit the files to my Git Repo (which I will then use to pull from and then into my live web server on Cloudways), the problem is that not all the files will be added in the git repo, and thus not all files will be copied over to the web server on Cloudways. What's the proper mechanism to copy all the files to the live server?

Do I delete .gitignore, and then commit ALL the files into the remote repository, so that Cloudways can pull all the files initially? And then copy the .gitignore file back into my local machine and then add and commit through there so that the unnecessary files won't go through and will be ignored in future git commits?

I'm so confused. Before I would bypass Git, and just edit the files live on the website. But now I feel like I need to go the proper route and use Git repositories for my future projects.

Also, what's the proper way to develop locally and then pushing files to the live server? Wouldn't I have to keep changing the database and config files before each commit/push from my localhost configuration to the live server's configuration? I'm so confused, please help lmao...
Thanks.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB