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?

  • JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    20
    ·
    6 days 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.

  • litchralee@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    38
    ·
    7 days 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.

  • schnurrito@discuss.tchncs.de
    link
    fedilink
    arrow-up
    19
    ·
    7 days ago

    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.

  • BehindTheBarrier@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    6 days ago

    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
      link
      fedilink
      arrow-up
      9
      ·
      6 days ago

      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
        link
        fedilink
        arrow-up
        5
        ·
        6 days ago

        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
          link
          fedilink
          English
          arrow-up
          3
          ·
          edit-2
          6 days 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.

  • who@feddit.org
    link
    fedilink
    English
    arrow-up
    19
    ·
    edit-2
    7 days 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.

  • calcopiritus@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    7 days ago

    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
      link
      fedilink
      arrow-up
      6
      ·
      7 days ago

      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
        link
        fedilink
        arrow-up
        4
        ·
        7 days ago

        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.

  • expr@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    6 days 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.

  • Cousin Mose@lemmy.hogru.ch
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    7 days 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).