I noticed that a lot of GitHub accounts only have repositories which are forked from other accounts. In addition the people who do this usually don’t make any contributions to the forked repositories.
I’ve heard of people collecting stamps and seashells, but why would anybody want to collect repositories? Personally I would only fork a repository if I wanted to make some changes to it.
9
In our line of work we tend to look for technical reasons, but in my opinion the primary reason isn’t technical. If you look at GitHub Help or other GitHub tutorials, forking a repo is one of the major steps for how you “do” GitHub.
When people are learning and evaluating GitHub, just about every tutorial out there is going to tell them to fork a repo as part of that learning process. Since the primary purpose of GitHub is to contribute, a lot of people working through the standard tutorials don’t realize if you just want a read-only clone you don’t have to do a fork first.
7
As you mentioned in your question, people fork repositories when they want to make a change the code, because you
don’t have write access to the original repository (unless you’ve been added as a collaborator by the owner of the repository).
In the forked repository they have write access and can push changes. They may even contribute
back to the original repository using pull requests.
I think there are multiple reasons why people fork repositories but don’t change them:
- they might fork a repository which looks cool, simply fork it (because it’s easy (only one click)) and want
to make a change later (and then probably forget it/didn’t have time to do so) - they fork a repository to make a change and then discover that the change is unnecessary and forget to delete
the own repository - they might fork a repository because one of the projects depends on an other repository (maybe via submodules) and
they want total control over the repository used as a dependency (the owners of the original repository might decide to move from github to google code etc.) - they might simply forget to push the commits
4
One possible reason: they have running code that depends on those projects and their build process involves pulling the dependencies from github. Having the fork protects them against breaking changes. For projects that don’t tag versions, this is the easiest way to achieve that.
1
The entire point of Github is “social coding”.
Personally, I fork repositories when:
- I want to make a change.
- I think the project is interesting and may want to use it in the future, but have no easier way of saving it for later on the device I’m currently using.
- I want to use some or all of the code in that repository as a starting point for my own project.
Now I’ve heard of people collecting stamps and seashells, but why would anybody want to collect repositories?
Why not?
There’s nothing (that I can think of) that can go wrong from forking repositories for personal pleasure. Honestly, I keep a folder of interesting projects that I see on Github and other places simply for inspirational purposes, and partly because I’m a geek. I understand that I don’t have to fork the project to read the code, but I may actually want to edit that in the future.
Now start forking.
5
I fork a lot of repos that I might want to use the code, or if it’s a project I’m interested in. When I want to come back and have another look at the code later, it’s easier to find if it’s listed under my repositories. I don’t have to google, or bumble around trying to remember what the name was exactly or thinking “where did I see that repo about foo again?” If it’s among my repos it’s easier to be reminded of these things.
1