S
S
Sergey Goryachev2017-02-22 20:07:21
git
Sergey Goryachev, 2017-02-22 20:07:21

How to automatically merge files from git to server?

In short, where can I find information on how to immediately send changes to the git to the server?
The branch master made a commit, and it was automatically picked up by the server.
Git on Bitbucket, VPSka server. Kick in the right direction, please)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stepan Krapivin, 2017-02-22
@webirus

two options
1) Through bitbucket webhooks - how they work can be read in the docks .
The main essence of the webhook is that with each push to the turnip, the webhook "knocks" at a certain address that you specify. And at this address, on your server, git pull is called from a turnip on bitbucket.
2) without bitbucket - on your server, create a bare repository next to the "combat" repository. We write a post-update hook in the bare repository. This is a regular script that enters the desired folder with the "combat" repository and does a git pull from the adjacent bare repository,
everything seems to be described correctly

I
Ilya, 2017-02-22
Hrebet @hrebet

You can use cron every minute (or how convenient) to execute:
Option? :-)

A
aol-nnov, 2017-02-22
@aol-nnov

tyts .
Practice Russian to express yourself more clearly! ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question