Welcome Guest, Not a member yet? Register   Sign In
GIT question
#1

[eluser]arthurhanlon[/eluser]
I was wondering if someone could comment on the best practice for managing a project in GIT that has multiple environments.

I am almost at a stage where I can deploy my stable, albeit feature incomplete, project and all the development has been done on the master branch up to this point simply because it's a single developer project and, well, the project wasn't near complete. I am moving over to this branching model very soon though http://nvie.com/posts/a-successful-git-branching-model/.

Now, as I have never really used GIT (or any VCS for that matter) before, I was wondering how you go about managing the repo for different environments as obviously, I have config files that are specific to my dev environment and they will obviously change when I put the project live.

I was thinking of dropping the env specific files from GIT and manually adjusting them when deployed BUT, you can't do this when deploying to things like PHPFog for example. I then discovered that CI can be fully env aware http://ellislab.com/codeigniter/user-gui...ments.html...awesome.

Since I've never done this before, I just wondered how others were doing it.

Cheers in advance,
Arthur
#2

[eluser]CroNiX[/eluser]
On this site, there are 9 videos on git that are some of the best that I have seen on git for beginners (although I'd watch them on youtube in HD).

Yes, absolutely make use of the ENVIRONMENT. Before CI added that, I did something very similar by setting a variable in index.php depending on the $_SERVER['HTTP_HOST']. Git tracks 100% of my files. Love it. "git pull"...bam...site deployed or updated.




Theme © iAndrew 2016 - Forum software by © MyBB