8
submitted 3 weeks ago* (last edited 3 weeks ago) by OliMoli2137@piefed.social to c/linuxquestions@lemmy.zip

So I've got a RasPi 3B+ and self hosting a bunch of bare Git repos (git init --bare). And I currently store my dots there. BUT I also have a public mirror on Codeberg. For now I just have two remotes set up and do `git push´ individually for each one. And I don't really envision a case where I start developing it on 2 different machines well. I don't know whether those 2 repos are in sync when I'm developing.

Now, is there a more robust way to keep those 2 mirrors in sync?

I was thinking of adding some kind of hook on the Pi, so that I push my changes to the Pi, and then the Pi pushes the same changes to Codeberg. so instead of my current workflow:

home computer -> Pi

home computer -> Codeberg

this happens:
home computer -> Pi -> Codeberg

Is that the right way of doing this?

Please let me know if you have any suggestions!

top 5 comments
sorted by: hot top controversial new old
[-] hobata@lemmy.ml 5 points 3 weeks ago

Well, if your codeberg is just a mirror and you actually use your raspbi as remote, and you have full control of raspi, why not simply use a cron job that syncs raspi and codeberg daily? Dead simple solution.

[-] commander@lemmy.world 4 points 3 weeks ago

A git hooks on your pi that is a post commit hook to push to codeberg

[-] OliMoli2137@piefed.social 2 points 3 weeks ago

ok but can you add that in vanilla git or do you need something like forgejo?

this post was submitted on 08 Apr 2026
8 points (100.0% liked)

Linux Questions

3710 readers
1 users here now

Linux questions Rules (in addition of the Lemmy.zip rules)

Tips for giving and receiving help

Any rule violations will result in disciplinary actions

founded 2 years ago
MODERATORS