Synchronize Bitbucket with Web Server

2

Is it possible to sync my project on Bitbucket with my web server? Instead of sending the project via FTP, it would be synchronized with my Bitbucket repository without having to send the project multiple times (via FTP to web server and via SSH to Git Versioning server).

    
asked by anonymous 29.04.2014 / 16:12

1 answer

1

Yes it is possible.

What you need is to clone your bitbucket project from the web server. Here you find how to do the clone inside of the server using git.

Briefly:

git clone https://[email protected]/user/project.git

This will copy the project to the current folder.

Then whenever you want to update the project.

git pull

Inside the project folder.

You probably use a remote server. Then you need to access your SSH server and run these commands. You can automate this task with some tools like Ant in Java.

    
29.04.2014 / 18:21