Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Funny you should ask. I had actually written this up back then – for a FreeBSD install because it’s what I use.

https://herrbischoff.com/2021/10/how-to-install-cgit-with-gi...

I’ve also tripped over something regarding “master” and “main” branches that’s easily fixed:

https://herrbischoff.com/2022/05/cgit-missing-idle-column-on...

If you want it even simpler, just run

    mkdir repo.git && cd repo.git
    git init —bare
in a folder on a server you have SSH access to and clone it on your local machine like

    git clone user@server:/path/to/repo.git


Doesn't that only work for single user setups, since a `git push` run from some else's machine could concurrently modify that repo.git directory?


The manual bare repo setup obviously offers no user access management beyond what the system's SSH configuration provides. Beyond that, a bare repository is actually an essential Git feature and what software like Gitea and even GitHub uses behind the scenes.

Given all users can share a user account on a server, it will behave exactly like you expect it to. Again, that's a core Git feature. Additionally, AFAIK Git has its own locking management. Also look up the `--shared` flag. `man git-init` is very helpful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: