this post was submitted on 29 Oct 2025
61 points (98.4% liked)

Programming

23300 readers
463 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

I've seen some projects on GitHub (howdy being one of them that came to mind) where there are forks, but when I check the forks out they are either unchanged, or are behind by a few commits. I was wondering why this would happen. It couldn't be for archival purposes, could it?

top 46 comments
sorted by: hot top controversial new old
[–] hanrahan@piefed.social 2 points 9 hours ago

I have a bunch if Steam games I have never played..

[–] expr@programming.dev 2 points 9 hours ago

Heh, guilty. Pretty much always something where I had an ambition to make a change but got distracted or didn't have time to work on it.

[–] ExLisper@lemmy.curiana.net 2 points 11 hours ago

We want to make changes but can't find time.

[–] BehindTheBarrier@programming.dev 6 points 14 hours ago (1 children)

Fork it so i have my version, regardless if the original goes away. (Assuming Github doesn't nuke all repos of course like they did with youtube-dl for a while)

[–] ArmainAP@programming.dev 9 points 13 hours ago (1 children)

GitHub nukes forks when the original repository is deleted. The correct way to handle your use case is by creating pull mirrors, ideally on a different host.

[–] Michal@programming.dev 5 points 12 hours ago (1 children)

I didn't know this, and I'm sure a lot other people don't know this and that's why they fork - to have their own copy of the repo, thinking they have full control over it.

I have forked projects in the past and IIRC i had to send a request to be disassociated from the original repo, otherwise all pull requests default to the original repo which is annoying.

[–] ulterno@programming.dev 3 points 8 hours ago* (last edited 8 hours ago)

You can simply git clone on your system and push it to whatever other remote you want. It should not be associated to the origin in that way.

[–] JackbyDev@programming.dev 20 points 22 hours ago

Fork repo, make local changes intending to push to fork for PR, never push anything. Very common.

Also, SO MANY SITES have the button that says "Fork me on GitHub!" that is often wonder if people think it's something that it isn't.

[–] SCmSTR@lemmy.blahaj.zone 53 points 1 day ago (1 children)

"Mmm this looks neat"

Puts in pocket for later

[–] refalo@programming.dev 4 points 22 hours ago (1 children)

This is exactly what I do... and then never touch it again.

[–] balrog@programming.dev 3 points 20 hours ago

I'm getting to it! It's on my to do list, with the 13,572 other projects I'm working on :(

[–] queerlilhayseed@piefed.blahaj.zone 70 points 1 day ago (1 children)

I have big plans for those repos and I am definitely going to get around to it 🥹

[–] sup@lemmy.ca 4 points 19 hours ago

Same, I'll get to them soon

[–] litchralee@sh.itjust.works 38 points 1 day ago

In my personal workflow, I fork GitHub and Codeberg repos so that my local machine's "origin" points to my fork, not to the main project. And then I also create an "upstream" remote to point to the main project. I do this as a precursor before even looking at a code on my local machine, as a matter of course.

Why? Because if I do decide to draft a change in future, I want my workflow to be as smooth as possible. And since the norm is to push to one's own fork and then create a PR from there to the upstream, it makes sense to set my "origin" to my fork; most established repos won't allow pushing to a new topic branch.

If I decide that there's no commit to do, then I'll still leave the fork around, because it's basically zero-cost.

TL;DR: I fork in preparation of an efficient workflow.

[–] einkorn@feddit.org 60 points 1 day ago (2 children)

One reason I can think off the top of my head is archiving: Nothing prevents the owner of a repo from simply deleting it.

[–] nous@programming.dev 35 points 1 day ago

While true and some will do it for that reason, I bet most do it simply because the friction to forking is so low.

Some might have an intention to work on it but then don't or might start looking at it in detail then give up or get to busy or lose interest.

Others might just click it to save it for later.

And don't forget all the people that click it by accident.

It's not like it is a big investment to click the button.

[–] locuester@lemmy.zip 12 points 1 day ago* (last edited 1 day ago) (1 children)

I do this. I have an instance of gitea running internally that mirrors any repo I have on github. Super nice for archiving things of importance or even as a bookmark. Sometimes I do it because of fear of censorship like dcma and stuff for software I use.

[–] bruce965@lemmy.ml 3 points 1 day ago (3 children)

Would you mind to share how to copy your setup? In particular how to mirror all your GitHub repos, do you have to manually add them to Gitea one by one?

[–] cecilkorik@lemmy.ca 12 points 1 day ago (1 children)

I'd recommend Forgejo rather than Gitea for a new install these days. It's a Gitea fork that was soft-forked (still compatible) until recently but is now moving to a hard fork model and has significantly more development momentum and a bigger community behind it. Still basically the same thing for most purposes, but I think Forgejo's approach to actions/runners makes way more sense and they've started adding features like ActivityPub federation that I think will put them in a good position in the future.

[–] Sxan@piefed.zip -5 points 1 day ago

Sourcehut is anoþer option. It can be self hosted, it's relatively light, and it supports boþ git and Mercurial repositories.

[–] hosaka@programming.dev 5 points 1 day ago

Forgejo has auto mirroring built in, it'll periodically sync the repos you add. The disadvantage is you have to add them manually. Initially I wanted a list of my started github repos synced to my forgejo instance and just added them one by one. A simple cron job might be enough to do that, but last time I checked github didn't have an API for fetching started repositories.

[–] locuester@lemmy.zip 3 points 1 day ago* (last edited 1 day ago)

Quick little script I run as a cron job. Script was authored by Claude Code. I’m not home right now but any llm can probably get you 95% of the way there. Remind me in a couple days if you don’t get something. Sorry I’m traveling right now

Edit: some details… it uses the gitea api repos/migrate endpoint after getting a list of repos from the github api. Super simple.

You could prob do in real-time with some webhooks but I don’t need anything like that. I just need a one time migration.

Also, mine doesn’t keep in sync with the upstream yet. I need another process to do that.

[–] schnurrito@discuss.tchncs.de 19 points 1 day ago (1 children)

Maybe they planned to make some changes, but never got around to them or at least didn't get them to work the way they intended.

[–] lukalix98@programming.dev 8 points 1 day ago* (last edited 1 day ago)

Confirmed. Guilty as charged.

[–] Kolanaki@pawb.social 25 points 1 day ago

I have done this just to preserve a thing in its current state because it looked like the main developer was gonna do something stupid and/or fuck it up.

[–] who@feddit.org 19 points 1 day ago* (last edited 1 day ago)

When looking for activity, are you only checking for the number of commits ahead/behind, or are you also checking for new branches?

A common workflow is to fork a project, clone it locally, add some work on a new branch, push it to your fork, and then create a pull request from the new branch. None of that will add commits to the default branch.

[–] nathanjent@programming.dev 6 points 1 day ago

Maybe I was trying to click the watch button and missed.

[–] Jankatarch@lemmy.world 9 points 1 day ago

I wanted to learn github.

[–] calcopiritus@lemmy.world 12 points 1 day ago (2 children)

Maybe some people don't delete the fork after their PR is done.

In my case, I found another explanation.

Sometimes, a random person comes and forks one of my repos. I check their profile, and it's a techbro student with hundreds of forked repos without any commits. With their bio referencing AI or some shit.

I'm pretty sure these people fork a lot of repos just to pad their CV or something. Make it look like you have a lot of repos. Because when you go to someone's profile, it is not clear that a repo is a fork instead of their own creation.

[–] tyler@programming.dev 6 points 1 day ago (1 children)

When you visit someone's profile on github it defaults to source. It won't show forks at all for a 'normal' visitor to a profile. You have to explicitly clear the filter to see forks.

[–] calcopiritus@lemmy.world 4 points 1 day ago (1 children)

Maybe they changed the defaults. I stopped using GitHub after they trained their AI over private repos.

But I remember clearly that I was annoyed when looking at my own repos because my forks (for actually doing PRs) would show at the top instead of my own repos.

[–] tyler@programming.dev 2 points 1 day ago

It’s been that way for many years, I’d say at least 4 or 5? Long before all this ai nonsense.

[–] aloofPenguin@lemmy.world 1 points 1 day ago* (last edited 1 day ago)

yeah, makes sense. The cynical part of my mind also led me to your 2nd explanation. :)

[–] colonelp4nic@lemmy.world 8 points 1 day ago

Sometimes I fork to make changes locally, but they're either me-specific or hacky garbage I don't want to publish. Because of that, I normally don't commit those changes, and definitely don't push to GitHub or make a PR.

[–] undefined@lemmy.hogru.ch 5 points 1 day ago* (last edited 1 day ago)

This reminds me of a legacy Rails 3.2 app that used a fork of the official Ruby on Rails only for one commit that backported some one-liner bug fix. This was at an old job in the Rails 6 days, getting it on the latest official version was definitely an adventure (no unit tests + tons of spaghetti code + a dash of currency conversions stored as Postgres floats).

[–] plm00@lemmy.ml 6 points 1 day ago

I've forked before when I needed a specific version easily stored somewhere, like a Node package. Or if I intended to make changes but didn't have write access. Or I wanted to save a repository in a way where I can easily find it in my repo list. But more often than not, I intended to pull down the code and contribute to it but for one reason or another didn't.

[–] MagicShel@lemmy.zip 4 points 1 day ago

Following instructions to use GitHub as a blog host. Step one: fork some repo so that I've got a copy on my profile.

[–] darklamer@lemmy.dbzer0.com -3 points 1 day ago (2 children)

What do you think that people should be doing instead? What is your own workflow when contributing to projects on GitHub?

[–] plm00@lemmy.ml 7 points 1 day ago (1 children)

OP is referring specifically to those who don't contribute but fork anyway.

[–] darklamer@lemmy.dbzer0.com -3 points 1 day ago (1 children)

How could anyone possibly know that those people don't contribute? Why would anyone even try finding that information?

[–] eager_eagle@lemmy.world 2 points 1 day ago* (last edited 1 day ago) (1 children)

you compare the number of forks with the number of contributors

forks are almost always higher, not just higher, but often by a factor of 10

[–] tyler@programming.dev 3 points 1 day ago

that is just people that got their commits in, it doesn't mean that others didn't try to contribute, but failed.

[–] aloofPenguin@lemmy.world 0 points 1 day ago (3 children)

I'd do a PR. Although I would understand forking if the project maintainers wouldn't merge a PR. (or create an issue (for the fix/ addition) if the README says that it's an option)

[–] cecilkorik@lemmy.ca 6 points 1 day ago

So while you're working on your PR, where do you push your commits? If you don't fork, you can't push them to Github. You don't have access to the repo you're making a PR for. That's exactly why people fork.

Of course you could just NOT push any commits, but then your commits only exist locally on your development machine, and if you have a hardware failure you've lost them, defeating the point of a distributed version control system. Or you could push them to another computer you have access to, but Github lets you push to your own free account for free, so most people would rather just do that. Which they do. By creating a fork.

Maybe it's okay if you're only creating a small PR with a single commit or two. But for more extensive development, anyone reasonable is going to create a fork so they have somewhere to store their work until it's ready. Once/If the PR is merged, the fork is abandoned as it's no longer needed. But that's why they exist.

[–] tyler@programming.dev 4 points 1 day ago

A PR requires push access... That's why you create a fork... So you can create a PR from your fork.

[–] Ephera@lemmy.ml 2 points 1 day ago

You generally have to fork to create a PR...