Skip to content
HN On Hacker News ↗

You Already Have a Git Server | GoPeek

▲ 37 points 31 comments by sheelagay 3w ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully AI-generated

96 %

AI likelihood · overall

AI
0% human-written 100% AI-generated
SEGMENTS · HUMAN 0 of 1
SEGMENTS · AI 1 of 1
WORD COUNT 262
PEAK AI % 96% · §1
Analyzed
Jun 23
backend: pangram/v3.3
Segments scanned
1 windows
avg 262 words each
Distribution
0 / 100%
human / AI fraction
Verdict
AI
Pangram v3.3

Article text · 262 words · 1 segments analyzed

Human AI-generated
§1 AI · 96%

If you have a git repository on a server with SSH access, you can just clone it:

git clone ssh://username@hostname/path/to/repo

That is it. No Docker. No CI pipeline. No serverless function. No YAML file with 47 indents. Just SSH and git — two tools you already have.

Once you have done some work, you can push your changes back to the origin server. By default, git will not let you push to the branch that is currently checked out, but this is easy to change:

Run this on the remote server. git config receive.denyCurrentBranch updateInstead

This is a nice way to work on server-side files without SSH lag or error-prone copying. You edit locally, commit normally, and git push just works. The files land on the server exactly as they are in your repo. No scp. No rsync flags you forgot. No "oops I overwrote the wrong file."

Auto-Deploy with Hooks

If you need more than just a file server, git can run a shell script when it receives a new push:

cat > .git/hooks/post-update <#!/bin/sh set -euo pipefail cd /path/to/site /path/to/generator EOF chmod a+x .git/hooks/post-update

You will even get the script's output sent back to your computer's terminal. So if your static site generator throws an error, you see it immediately. No tab-switching to a dashboard. No refreshing a build log page.

I have git set up to this blog's site generator. It is just so groovy to be able to type up posts locally, and then push them to the server. Write. Commit. Push. Live. That is the whole workflow.