Publish content with git

If your Gemini capsule is version-controlled using 'git', these few steps will allow you to use 'git' to also publish your changes made locally onto your server.

Create a git bare repository on your server

mkdir ~/repo && cd ~/repo
mkdir gemini.git && cd gemini.git
git init --bare

Create a post-receive hook (based on provided template)

cd ~/repo/gemini.git/hooks
wget -O post-receive https://codeberg.org/etienne/gemini/raw/branch/main/post-receive-template
chmod +x post-receive

Once downloaded, update 'post-receive':

Add your new repo as remote, then publish

From your project root folder, on your machine:

git remote add gemini username@your.server.ip.address:~/repo/gemini.git

You're all done. You can now publish your content via 'git' by running:

git push gemini master

=> (back to 💻 Tech) | (back to homepage)

Proxy Information
Original URL
gemini://daima.fr/tech/2021-02-16_Publish_content_using_git.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
460.263161 milliseconds
Gemini-to-HTML Time
0.385432 milliseconds

This content has been proxied by September (3851b).