S
S
Sergey Smagin2022-01-05 22:35:51
git
Sergey Smagin, 2022-01-05 22:35:51

How to organize work with git without cloning the site to the local computer?

We launched a pet project (VPS server) on production. Work is done with different developers purely through freelance.
There is a need to competently organize the further development of the site through version control. As far as I understand, working through git/github means cloning the site to the developer's local computer. But considering that work through freelancing and improvements are not large-scale (without concluding contracts), I would not want each developer to clone the site for himself.
Therefore, I have a question how to properly organize the further refinement of the site?
What are the requirements:
1. work on the site without copying it to the developer's local computer (can it be possible somehow in the cloud ???)
2. testing not in production (that is, first you need to have it on a subdomain or a clone of the site on the same vps, but how is that right ???)
More than 1 developer will not work on the project at the same time
. Now I give access to one or another developer via SFTP , he himself looks where you need to make changes and immediately uploads the file to the working (production) immediately. Naturally, this is a game, so you need to organize a normal process.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Kulakov, 2022-01-06
@gitosik

No, well, of course you can edit files directly on the github and make commits, but this is complete game.
In my opinion, it's better to do this:
1. Make the repository private, create a dev branch in it
2. Give access to a trusted person through collaborators
3. A person edits the code in the dev branch and makes a pull request (editing through a clone or directly on the github, like himself decide)
4. After CI tests in workflow, you merge this pull request into the master/main branch
5. After merging, workflow CD is launched and deployed to production on your VPS.
In general, this concept is widespread))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question