Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

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.

share|improve this question

closed as primarily opinion-based by MichaelT, gnat, Dan Pichelman, GlenH7, Bart van Ingen Schenau Oct 12 '14 at 15:39

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

they want to ensure that they have a stable backup should the owner of the project delete his repos and disappear – ratchet freak Jun 6 '13 at 11:26
When you come to a fork in the road, take it. – dan1111 Jun 6 '13 at 11:27
@dan1111 - When you come to a fork in the road, take the one less traveled by - unless you're not Robert Frost. – Aadit M Shah Jun 6 '13 at 11:29
Simply because that's how pull requests work in GitHub (and because people are a bit fork-happy and then forget about it sometimes, or abandon their project idea and forget to get rid of the fork) – haylem Jun 6 '13 at 11:39
just a comment, as I understand they use as a "backup" of the code, but they forget (or not know) that updates the repository does not affect the "forks", when they should be doing right fork (for backup) and "Star" the repository to know when to do a "re-fork", in other words, they think "fork" is almost the same thing as "Star" and unaware maintains an outdated code. – Guilherme Nascimento May 7 '14 at 19:40

5 Answers 5

up vote 39 down vote accepted

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.

share|improve this answer
Along the lines of non-technical reasons: I've clicked on the 'fork' button several times hoping to see who's forked the repo, only to find that I've forked it. Ooops! Not sure if other's have done the same. – gdw2 Jun 6 '13 at 21:27
@gdw: Causing you to exclaim, "Oh, fork!" – Ben Jackson Jun 7 '13 at 0:47
I remember when I first learned about git and Github, I did some forking just because guides and tutorials seemed to propose it as the way to get your own copy of the code on your computer. – rmac Jun 7 '13 at 9:01

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
share|improve this answer
When you aren't using Github, you're going the old-school route and creating a local cloned copy of the project so you can modify it. Forking on github gives you access to pull requests which are preferred by many projects. If you're on another project, you'll end up creating patches and sending those in to be reviewed. – omouse Jun 6 '13 at 16:45
It's a simple one-step process to setup a remote tracking branch. Anybody who has tried to contribute to a git repository outside of GitHub knows how tedious it can be. Plus, if the original author goes AFK, you can follow the development graph to find forks that are still actively developed. Hopefully, it'll keep GitHub from degenerating into a wasteland of dead projects the same way SourceForge did. – Evan Plaice Feb 19 '14 at 0:03

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.

share|improve this answer

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.

share|improve this answer
+1 for the "Why not?" section. – Llepwryd Jun 6 '13 at 21:02
My additional 2 cents on the "Why not?" section: My habit is of always doing "git push" after I've finished working on a feature; it has that Q.E.D. satisfactory feeling for me (that I don't get when writing out the remote and branch name). So whenever there's even a slightest chance that I may want to do changes to the repo, I'd prefer to fork it, instead of later having to change the default "origin" repo. – yoniLavi Jun 12 '13 at 22:31

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.

share|improve this answer
this doesn't seem to add anything substantial over points made and explained in prior 6 answers – gnat Oct 10 '14 at 16:22

protected by gnat Oct 10 '14 at 16:21

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.