Reputation: 9165
Hello I'm kind of a noob when it comes to deployment...
My situation ist the following:
Now I'm trying to have a production version on my server on the regular port 80 and another one on 81 for example on a different vm.
Now i try to get the production version out of the way. Therefore I waned to have two directories with different version/branches - one dev (let's say: home/app1-dev) and one production (let's say: home/app1).
But when i clone my repro twice i get the error destination path already exists...of course git doesn't look for directories...
I don't even know if this is a good way to make all this happen...? Are there better ways to deploy a dev version and an independent production version?
Any help or more fundamental approaches?
Upvotes: 2
Views: 326
Reputation: 431
I am not sure what is the best approach but in my company we use 2 branches: master and prod. Prod is the stable version that is used on our production servers. Than you can use different approach to copy data to correct directory. The easiest way would be to clone the repo into destination folder (the one you server uses) and then checkout to prod branch and pull updates. You can write 'deploy' script that will checkout to prod branch in prod directory and pulls data. What excally are your problems with cloning repo?
Upvotes: 2