# Git Deployment Multiple Existing Environments

3 messages from 2015-09-01 to 2015-09-03. Participants: Sukhwinder Singh, Thomas Koch.
Thread: https://gitlist.dev/t/40237

## Sukhwinder Singh, 2015-09-01 07:50

Subject: Git Deployment Multiple Existing Environments
Message-ID: <BAY180-W4617CD6AE98F64442A918BC26A0@phx.gbl>
URL: https://gitlist.dev/e/BAY180-W4617CD6AE98F64442A918BC26A0%40phx.gbl

```
Hello,
I am kind of new to Git and I have a question regarding using Git for a website. I have searched a lot but haven't found a solution yet. We already have 3-4 environments setup on our Windows servers without Git and each environment already has code which is different from each other.

There are three environments
Live
UAT
Test (has the latest code)


And then developers have their local copies.

We write and test the code locally and manually move each point from one environment to other using merging software and test at each environment.
Now we want to use git because manually moving the code is a lengthy process. Also as the developers have local copies, it is very difficult to manage code.

Code is written locally by the team and then after testing locally it is first merged with "Test" environment code, then "UAT" and then, finally with "Live".
So we have two concerns:

There is different code already existing on these environments.
Testing the code on each environment using the web server.

What is the best way to go about it? As I am new to git more details will be helpful, like commands to use.

Thanks, 		 	   		  
```

## Thomas Koch, 2015-09-01 08:34

Subject: Re: Git Deployment Multiple Existing Environments
Message-ID: <201509011034.11257.thomas@koch.ro>
URL: https://gitlist.dev/e/201509011034.11257.thomas%40koch.ro
In-Reply-To: <BAY180-W4617CD6AE98F64442A918BC26A0@phx.gbl>

```
On Tuesday, September 01, 2015 09:50:45 AM Sukhwinder Singh wrote:
> Hello,
> I am kind of new to Git and I have a question regarding using Git for a
> website. I have searched a lot but haven't found a solution yet. We
> already have 3-4 environments setup on our Windows servers without Git and
> each environment already has code which is different from each other.
> 
> There are three environments
> Live
> UAT
> Test (has the latest code)
> 
> 
> And then developers have their local copies.
> 
> We write and test the code locally and manually move each point from one
> environment to other using merging software and test at each environment.
> Now we want to use git because manually moving the code is a lengthy
> process. Also as the developers have local copies, it is very difficult to
> manage code.
> 
> Code is written locally by the team and then after testing locally it is
> first merged with "Test" environment code, then "UAT" and then, finally
> with "Live". So we have two concerns:
> 
> There is different code already existing on these environments.
> Testing the code on each environment using the web server.
> 
> What is the best way to go about it? As I am new to git more details will
> be helpful, like commands to use.
> 
> Thanks, 		 	   		  --

There are douzends of different git deployment scripts on github from minimal 
to multi-data-center-enterprise-grade. I wrote this one for my workplace:

https://github.com/comsolit/comsolit_deploy

The README contains links to alternative solutions.

Thomas Koch

```

## Thomas Koch, 2015-09-03 07:30

Subject: Re: Git Deployment Multiple Existing Environments
Message-ID: <201509030930.05121.thomas@koch.ro>
URL: https://gitlist.dev/e/201509030930.05121.thomas%40koch.ro
In-Reply-To: <BAY180-W19A853193986EA50E27C1BC2680@phx.gbl>

```
On Thursday, September 03, 2015 09:11:10 AM Sukhwinder Singh wrote:
> Hello,
> 
> I have posted this question on various forums as well but I have not
> received any guidance yet. I was requesting some steps which I can follow.
> Our Servers are windows based.

Don't use windows. Get rid of people who think windows is a server operating 
system.

```
