Hacker News new | ask | show | jobs
by hhsuey 2251 days ago
Forgive me for my ignorance, but I haven't contributed to open source much yet. What is the reason for forking this repo. I see a lot of people have done it. Wouldn't that be akin to cloning someone else's personal blog? I just don't see the point of that.
5 comments

It's weird, but two potential reasons:

* in case the repo gets deleted, at least you still have a copy

* some github apps on tablet might give you an easier access to your own list of repos

Doesn't GitHub delete forks if the original is deleted? Of course, actually cloning the fork onto your computer and pushing it to a new repository without using GitHub's "fork" feature should get around this easily.
Deleting a private repository

When you delete a private repository, all of its private forks are also deleted.

Deleting a public repository

When you delete a public repository, one of the existing public forks is chosen to be the new parent repository. All other repositories are forked off of this new parent and subsequent pull requests go to this new parent.

> When you delete a public repository, one of the existing public forks is chosen to be the new parent repository. All other repositories are forked off of this new parent and subsequent pull requests go to this new parent.

Yikes, is this a random process?

Apparently the oldest fork wins, or the author of the repo can decide. https://webapps.stackexchange.com/questions/86769/which-fork...
Makes sense. I thought about it a little more and came to the same two potential reasons.
Ive noticed some people use github almost like a social network. A rough analogy to Twitter would be that starring a repo is similar to liking a tweet, and forking it is almost like a retweet.
Good analogy
what is the biggest same-sex dating website in the world. Github -_-!
Possibly in order to raise Pull Requests against the repo?

https://github.com/jbranchaud/til/pulls?q=is%3Apr

25 closed merges, of which half of them are closed and half merged. Compare that to 330 forks and 6.7k stars. This is still an overwhelmingly read-only parent fork that is basically the author's personal TIL blog. https://github.com/jbranchaud/til/pull/24
I usually click 'fork' with the intention of making some minor change, and maybe committing it back.

90 percent of the time, that minor change either isn't suitable for being committed back to the project (it's badly hacked in, it's too specific to my usecase, etc.), Or the change ends up being harder to make or test than I had imagined, so I give up but don't bother deleting the fork.

That could explain the large number of forks and small number of PR's

One of the benefits of open-source is that you can ensure a copy of the source exists, in the event that something makes the original source disappear.
Gotcha. So the motivating factor was for individuals to get a copy for themselves, perhaps even use it as a form of bookmark overloaded as a backup feature. They'll need to keep pulling if they want to keep it up to date, but I suppose that could be automated.
https://probot.github.io/apps/pull/ to keep forks up to date automatically.
This is pretty good, now I can ditch my little script

    #!/bin/sh
    git pull upstream master
    git push origin master
TIL...
Staring at an empty sheet of paper (or a text file) can be daunting, and can suck all of your enthusiasm out of you in short order. It's much, much easier to start with some content and append your thoughts to it.