0

How do I set up git so that it will push to a local remote server? Say I run a vmware server in the other room. I have the IP and root access to the server in this case. I want to be able to push to it then have it deploy to the live production based off this push. IE I want a git remote of say "localdev" and "localpro" for dev and production. The "localpro" should be my folder I serve the webpages from.

This make any sense or am I just lost in my own little world of dreams?

1 Answers1

0

You need a listener for your git push (git daemon, or Apache, or SSH)
You can also consider a Git repo hosting service like gogs.io, very simple to install: just copy one executable.

In any case, you will manage bare repos, to which you can add a post-receive hook with a line like:

git --git-dir=/path/to/project_root/.git --work-tree=/path/to/localpro checkout -f
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250