D
D
Dokma2017-04-06 09:56:58
git
Dokma, 2017-04-06 09:56:58

What's the best way to do it?

I have a website, it works with PHP + NodeJS. The site is /var/www/address, and NodeJS /var/www/bot and there are two more folders /var/www/dev and /var/www/dev_bot and this is tied to the dev subdomain. there I make all sorts of features, check them and upload them to the main site. So I want to use git, develop a dev version, and then do, for example, git push and that the dev would be loaded into production and that, for example, I could cancel it. Well, in general, what would be the history of releases. What is the best way to do this?
And yet it's all on the server, and I work from the local computer

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Nazarov, 2017-04-06
@vnaz

You need to do this:
1. Learn git.
2. Familiarize yourself with git-flow .
3. Use git checkout, git commit, git push, git pull

D
developer007, 2017-04-06
@developer007

In general, there is a project
, it lies on bitbucket (let's say)
there are two main master branches, develop
google Integrations bitbucket is
configured so that when pushing a request to the develop branch, there is a GET / POST request for a script on the SUB domain. which does exec("git pull"); - beforehand git checkout develop
and when you merge develop with master, then with MERGE everything was the same on the main
develop domain, master is on the topic of git-flow (see previous answer)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question