A
A
Alexander2017-01-03 18:33:30
git
Alexander, 2017-01-03 18:33:30

How to build a version control system for a web project?

There is a web project. While I'm the only developer on it. Locally I develop a site on Wordpress , make changes, change functionality. Work mostly with php , then javascript and layout. New functions are tested locally, then uploaded via ftp to the test domain, work on the hosting with another database is tested again, at the same time it is shown to other project participants, after that the original version is updated there on the hosting.
The question arose of tracking changes, because there are already a lot of them, as well as connecting other developers.
Therefore, it is necessary to implement version control, at the same time it will always be possible to roll back to the previous state, as I understand it.
After reading other questions and answers here, I came to the conclusion that it is better to immediately dwell on the Git system for the sake of perspective and its prevalence. There is little experience in development, but with version control systems - none at all. Therefore, the poke method did not work to build anything, I ask for advice on how to organize everything and build it.
The complete guide to Git is too long, and, as it seemed, for Linux users 'a and everywhere commands for its command line.
On hosting, of course, there is no way to install GitLab , only if there is a dedicated server.
Locally costs Windows 10, with Linux'om in a life did not deal.
I came to the conclusion that you need to have one repository (so?), from the local computer it will be sent (committed?) there, and from it already - to the test domain for display to others, and in the final - to the original domain. What is needed for this? You can’t create it locally and on the hosting, so use either GitHub (you need private) or, for example , BitBucket (private free for up to 5 people, so I chose it). The local development machine had Git GUI installed first , but then SourceTree was chosen after reading the other answers here. How to work further? How to make friends with the local SourceTree client and its "native" BitBucket? Как это все быстро заливать на тествый домен, затем на рабочий? Как подключить других людей к разработке?
По тому пути ли я иду? Ибо сам принцип изначальной постройки системы не совсем понятен из-за отсутствия опыта.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Владимир, 2017-01-03
@Casufi

BitBucket имеет такую штуку - Pipelines https://bitbucket.org/product/features/pipelines
Эта штука нужна для того, чтобы не заливать результат по FTP руками, делаете допустим из бранча мастер - заливку на продакшн хостинг, а из бранча девелоп на хостинг для тестирования с другими людьми
Теперь
1) https://git-scm.com/book/ru/v2 Полное руководство обязательно к прочтению
2) Не зная команды линукса вы не настроите непрерывную интеграцию, учите

M
malbaron, 2017-01-03
@malbaron

First, it doesn't have to be git.
There are trackers with issue.
Git - keeps track of the source code. But it may be more convenient for you to write the details in a separate issue, and not in the comments to the git commit.
You can also combine.
Secondly, you don't have to read the complete git manual.
At a minimum, even two commands are enough:
git commit -a -m "Description of changes"
git push
Thirdly
, Gitlab (and other software on your server) is not necessary. They provide a service (even a free one, sort of) - by placing the code with them.
BitBucket also provides a similar service (for free), but the functionality is less than that of Gitlab.
GitHub also has a similar service for little money.
Fourthly
, when working with a large crowd, it is better to divide the repositories into separate ones in terms of meaning, and not work in one big common turnip - by modules, frontend, backend, etc., etc.
Although you can work in one turnip, but then you will have to pay more attention to merging .
When working in one - one common repository for all modules (frontend, backend) is enough.
Fifthly
, by default, the organization of work in git just assumes that turnips live in two forms - remote on the server and local.
Sixthly
, the test for display and the final one for uploading to the production server can be solved by branches.
Traditionally, the branch called "master" is the main (combat) branch.
Seventh
, GitLab is quite heavy and demanding on the server
If you really want something similar to your personal GitLab, then it makes sense to look
at https://habrahabr.ru/company/selectel/blog/305422/ you will have a lot of branches and their unions . And even then - Gitlab has a lot of opportunities for visually observing changes.

S
Saboteur, 2017-01-03
@saboteur_kiev

git works on both Windows and Linux, and learning a few commands on the command line is not a problem.
git init is not a linux command, it is a git command, and works the same way both ways. The difference can only be in the features of the file system (attributes and access rights), but you still upload via ftp.
It is not necessary to set up a server, you can just work in a local repository, just with ftp you will not need to copy the .git folder.
The official documentation on the official git website is perfectly described to get started right away (there is even in Russian), or to read deeply and completely.

Z
zorca, 2017-01-04
@zorca

Bitbucket is an excellent service, SourceTree is buggy, there may be hangs when sending commits to the server, especially with weak machine parameters. I like SmartGit better - smart, bug-free, though the interface is only English.

D
Denis Yanchevsky, 2017-01-03
@deniscopro

Might come in handy with VersionPress .
At the very moment, unfortunately, my hands have not reached to try it, but from time to time I meet mentions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question