Publishing with git + ssh: Difference between revisions
(Created page with "* Convert local folder into a bare rep * scp the bare repo to a (non-public) part of your server * Create the webhook in the bare repo on the server") |
No edit summary |
||
Line 1: | Line 1: | ||
This recipe is to describe the steps for taking a local folder that's managed by git and using a remote server where you have ssh access, creating an "as-simple-as-possible" remote that can be pushed to (and eventually pulled from) and that is also mirrored on the same server. In other words, there's also a public working directory that automatically gets updated (via a githook) when the repo is pushed to. | |||
* Convert local folder into a bare rep | * Convert local folder into a bare rep | ||
* scp the bare repo to a (non-public) part of your server | * scp the bare repo to a (non-public) part of your server | ||
* Create the webhook in the bare repo on the server | * Create the webhook in the bare repo on the server |
Revision as of 15:44, 9 October 2024
This recipe is to describe the steps for taking a local folder that's managed by git and using a remote server where you have ssh access, creating an "as-simple-as-possible" remote that can be pushed to (and eventually pulled from) and that is also mirrored on the same server. In other words, there's also a public working directory that automatically gets updated (via a githook) when the repo is pushed to.
- Convert local folder into a bare rep
- scp the bare repo to a (non-public) part of your server
- Create the webhook in the bare repo on the server