When not to “Fork” on Github  

TL;DR: Fork in Github is not as same as Like in Facebook. Github has Star for that. Fork only when it makes sense or you’ll end up with a few old repos. Forking can be really useful if you want to submit a patch to the parent repo.

When I first started using Github, just like many others I simply went ahead and forked each and every repository I liked on Github. But this makes no sense at all.

Fork because the site says “Fork me on Github” #

When they say that they are actually asking you to contribute to their project with code, tests, docs or other stuff at Github. Simply forking the repo and leaving it like that is no use to them.

Fork to start a completely new project #

When we create new products, sometimes it’s easier to start on something which already exists on Github although the final result is going to be different. Instead of forking, create a new project.

I think GIthubs Fork is not meant for that. Even if you did, at a later time, I’m sure you’re going to ask Github support to convert your repo into a regular one (which also works by the way).

e.g. Android is fork of Linux which started from Linux. But now it’s something entirely new. Linux is not going to pull changes made by Android into Linux (I guess)

Fork to fill your Github profile with something #

This is just silly. I have seen some people (especially IT students) do that when they prepare for interviews. It is true that tech companies are now starting to consider your Github profile as much as your resume. Instead of unnecessary forking, it’s always better to create new repositories for small projects we do during studies. Even if it looks small for us, for someone maybe else that very piece of code is what they may have been looking for.


Now read this

Create an empty git branch

It’s really easy to create a new empty git branch with no parents (AKA orphan branches). First create an orphan branch with git checkout --orphan newbranch. Now you can remove any files in the directory with git rm -rf * and finally push... Continue →