Sync remote server with GitLab repo, everytime a new commit is pushed.
I am using the free plan of GitLab.com and this is the problem I am trying to solve:
I have my desktop where I work on my project, and commit changes from it to GitLab
I have a remote server, which needs to keep an up to date copy of the repo, which I end up doing manually, using git clone / git pull.
I never edit my source directly on the remote server.
The remote server is not always publicly acessible. Some times it is a VPS on DigitalOcean, and sometimes it is just a Raspberry Pi on my home network, behind a NAT.
Is there a way to setup a small service on my “remote” server, that looks out for a new commit being pushed to my GitLab repo, and automatically pull it?
Thanks in advance!
of course you will need to set up the project on the Git server that you are pushing to. As soon as you commit to your gitlab.com repo, it will automatically push to the other server.
Can you explain the bit about “the Git server that you are pushing to”? I don’t have a git server, and I was wondering if there is a small system daemon that I can run, that checks if there are any new commits to the original GitLab repo and pull those changes?
I don’t intend on installing something like GitLab on my mirroring end-point.
I have my desktop where I work on my project, and commit changes from it to GitLab
I have a remote server, need to clone a copy of the repo using git clone on remote server. How can we achieve this