this post was submitted on 12 Jun 2026
6 points (80.0% liked)

Git

4704 readers
23 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 3 years ago
MODERATORS
 

im working on a decentralized messaging app and generally up until recently i thought in such a system, if a peer is offline, you cant send a message... it wouldnt be "decentralized" if there was some central queue of messages.

it took embarassingly long, but then it hit me... git... just regular git is a decentralized database.

in my setup i need the ability for others to be abe to read and only i should be able to write to it. that functionality is out-the-box in git.

git is also pretty standardized so there are many providers if users want to move away from Github.

the storage requirements for my project are fairly small. typically small text messages. the data itself thats publicly readable would be encrypted.

top 20 comments
sorted by: hot top controversial new old
[–] Feyter@programming.dev 17 points 1 month ago* (last edited 1 month ago) (1 children)

If the question is really about "can", than the answer is definitely yes.

If it's about if you should, than it's a clear no. Because storing data in a GitHub Project is not the use case. Nothing in the protocols or the platform itself is optimized for that. Also GitHub could just pull the plug of your project if they ever feel that it is against their terms.

[–] xoron@programming.dev 0 points 1 month ago* (last edited 1 month ago) (1 children)

that "can" is all i need to know/confirm. im not using git in a conventional way at all.

it'll be unfortunate if github pulls the plug on my app. a key detail about git is that its decentralised. users can use different providers like gitlab (many have a free offering). git itself can have multiple remotes for redundency.

[–] asdfasdfasdf@lemmy.world 6 points 1 month ago (1 children)

Pretty easy for the few platforms offering this to ban you and any accounts hosting your project, even if you make a new one.

[–] xoron@programming.dev -1 points 1 month ago (2 children)

In any case it wouldn't be on my account. It would be great for users to self-host. Things like GitHub would only make it easier to get started to test things out.

Why would they ban my account? That would be unsettling. I'm a developer. The code itself is fairly basic git stuff.

My project is hardly popular, but if it gets there, I'm sure it would impact githubs performance. Would the concern be that my app ddos GitHub? I can explicitly prevent remotes like GitHub if necessary.

[–] EarMaster@lemmy.world 4 points 1 month ago (1 children)

Maybe you should warn your users that there is a risk of getting banned so they don't use their actual account for that.

[–] xoron@programming.dev 2 points 1 month ago

thanks. i'll aim to do that. i'll see if i can figure out who to reach out to from github and etc to ask.

[–] gankouskhan@piefed.zip 1 points 3 weeks ago

Using it in this manner is explicitly against their tos. You are not the first person trying to abuse the service.

[–] Hyperlynx@aus.social 15 points 1 month ago

@xoron you can. I can jump off my balcony too, but I'm not going to.

[–] StripedMonkey@lemmy.zip 4 points 1 month ago (1 children)

GitHub has a maximum of something like 10GB of storage available. That being said, I think your described requirements don't actually match git. If you're just publishing messages publicly (even if encrypted) then you can do the same thing with a simple http server.

I think it's a really poorly thought out idea.

[–] xoron@programming.dev 1 points 1 month ago (1 children)

in my project there is a focus on client-side storage. i hope it doesnt ever get to 10GB. as messages are published/read, the git DB is cleared as appropriate. i dont need the git history so i'll do what is needed to reduce the data consumed. i dont expect it to get to that 10GB capacity, that isnt its purpose and thats a bridge i dont exprect to cross any time soon.

your absolute right about there being alternative ways to do this. i specifically want some thing a user can manage. my app right now doesnt have offline-capabilities and this is an approach to introducing that capability. using a http server would be centralizing an otherwise decentralised architecture.

i have given it some thought and i think this is the only way it makes sense for me to introduce offline messaging without centralizing.

the project is pretty complicated and its difficult to describe how it would work without an exampler so id like to share the initial idea here before i try things out to demo.

[–] StripedMonkey@lemmy.zip 3 points 1 month ago

Git is designed as a permanent, historical record of text documents. You don't "clear" it out by deleting stuff, committing, and pushing. That stuff still exists, even if you change commit history it's going to stick around in the reflog for a long time.

[–] FizzyOrange@programming.dev 3 points 1 month ago (1 children)

Honestly Git sounds terrible for this. And how is it decentralised if you are using GitHub?

[–] xoron@programming.dev 0 points 1 month ago

i understand how it must sound but ive thought about it for a while, and it seems ideal for my particular architecture.

github isnt decentralized, but git can have multiple remotes for redundency. you could use multiple providers including selfhosted options.

[–] SteleTrovilo@beehaw.org 2 points 1 month ago (1 children)

You have noticed that GitHub has had a lot of downtime recently, right? You'd probably prefer something more stable.

[–] xoron@programming.dev 1 points 1 month ago

Ideally I can advise people to self-host. I'm hoping to make something generic so it it can work with any git backend lit gitlab, codeberg, etc.

[–] amzd@lemmy.world 1 points 4 weeks ago (1 children)

If you’re mostly looking to build a front end you can use the chatmail core library to handle all message delivery and profile creation. That way you instantly tap into the hundreds (if not thousands) of chatmail relays people are already running and as a bonus you can be compatible with other chatmail messengers like Delta Chat, Arcane Chat, etc.

[–] xoron@programming.dev 1 points 4 weeks ago (1 children)

Thanks! I haven't come across chatmail before. I'll take a look there and see how it works.

With git, I like that there are many providers with a free-tier. It'll make it easier to get started. Although it seems this way of using git could be against ToS.

[–] amzd@lemmy.world 1 points 3 weeks ago

Git changes are accumulative so not great for messengers because the server should only temporarily store the message until the other client has fetched it.

[–] FiniteBanjo@programming.dev 1 points 1 month ago (1 children)

There is a Repo size limit on GitHub and Codeberg, sorry to say. It's definitely only in the MB. If you go over the size limit then there is a grace period followed by a deletion.

[–] xoron@programming.dev 1 points 1 month ago

That would be acceptable. I can limit it to only text messages.

The aim would be for it to be able to use a generic git backend. Perhaps the advice I give should be to self-host a git server.