2
I have a website that I’m working on, where we’re now starting to install version control and we’re having a hard time testing the site before sending it to production.
We have the following domains:
dominioprincipal.com.br
dev.dominioprincipal.com.br
There is the possibility to create some development branch in dev.dominioprincipal.com.br and stay the domain.com.br in master?
OTHER OPTION: We know that our hosting is managed by Cpanel, where you must create a .cpanel.yml to move from a folder previously created for git repositions to the main domain folder. However, this file must be versioned, and this generates rework. Any recommendation?
UPDATING
We currently work with this structure, where we commit to the folders within the repository, where each one must have their .cpanel.yml to redirect to the respective public_html, however, as .cpanel.yml must be versioned to work (as far as we currently know) whenever we do a new "upload" to a different website, it overwrites this file (which is basically our main problem)
1 - Yes, there is. I have 2 and I push to dev and only when it’s ready do I push everything to the master. 2 - Change this to Amazon which you can then deploy directly to dev and production. 2 basic servers, 1 for each. ;)
– Jorge B.
@Jorgeb. Could you give me more information about how you do this process? Because it seems to me that’s exactly what I need!
– DeElfos
It wouldn’t be the case to add one
remote
? That’s why you push the branches only in your respective repository...– Felipe Avelar
You can use post-push triggers to start the build process for each of the versions. For example, every time you push the dev branch you release build in dev and the same with Prod. Github allows you to set up webhooks that do this service. It is also worth studying IC services such as Jenkins
– Woss
@Felipeavelar added information that might clarify a little more, helped?
– DeElfos
@Andersoncarloswoss added information that might clarify a little more, helped?
– DeElfos
If the problem is to overwrite a file that shouldn’t be overwritten, what needs to be done is to remove the versioning file with git rm and then add it to . gitignore...
– Felipe Avelar
@Felipeavelar the question is not to remove the file, the question is: can I somehow visualize what is being developed without displaying to the end user? This file is giving us trouble... example: master branch and dev branch, can I just view dev? Even a thousand excuses for not being able to explain exactly my doubt... kkkkk
– DeElfos