You already have a git server:
Oct 24, 2025
If you have a git repository on a server with ssh access, you can just clone it:
# This works. git clone ssh://username@hostname/path/to/repo
You can then work on it locally and push your changes back to the origin server. By default, git won’t 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 great way to sync code between multiple computers or to work on server-side files without laggy typing or manual copying. If you want to publish your code, just point your web server at the git repo:
git clone https://hostname/path/to/repo/.git # You can get rid of the .git part of the command by either setting the # server to remap it to a nicer URL or by just renaming the .git directory # (although this stops you from running git server side)
… although you will have to run this command server-side to make it cloneable:
# Create some files used by git-over-http: # Should be repeated after making changes. git update-server-info
... continue reading