KawaiKx
KawaiKx

Reputation: 9920

How to sync a server with bitbucket automatically

Is it possible that when I push to a repo on Bitbucket, it automatically updates my server too?

Currently I push to a repo. then login into my server. and pull from repo.

since the server is Linux, can I create a script with commands like git pull which runs every 5 minutes or so?

Upvotes: 1

Views: 2759

Answers (1)

viraptor
viraptor

Reputation: 34185

You can't really pull automatically, but you can do notifications.

For example via webhooks: https://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html

But an easier solution is probably to just push to both places yourself. You can set up multiple push remotes for example. Then if you want to update the code automatically, you can set it up using git hooks/triggers.

Upvotes: 1

Related Questions