Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean to fork on GitHub?

After few explorations, In my understanding, it is related to contribution.

Fork means to make a copy of the repository (the one being forked) into my own github account. If I want to fork the official jQuery repository, then I would go to https://github.com/jquery/jquery and hit the "Fork" button and GitHub will copy the repository (jquery) to my account (http://github.com/sanjaykhadka). Then a copied version of that repository will be available to me at http://github.com/sanjaykhadka/jquery

Now I can make whatever the changes I wish to make to my repository and then send a pull request to the original repository (jQuery's repository), asking the jQuery team to merge my changes into their original repository.

Did I understand it properly, or does it mean something more or something else?

like image 613
Sanjay Avatar asked Jul 24 '14 17:07

Sanjay


People also ask

What is the point of forking Git?

The Forking Workflow helps a maintainer of a project open up the repository to contributions from any developer without having to manually manage authorization settings for each individual contributor. This gives the maintainer more of a "pull" style workflow.

What happens when you fork a git repository?

A GitHub fork is a copy of a repository (repo) that sits in your account rather than the account from which you forked the data from. Once you have forked a repo, you own your forked copy. This means that you can edit the contents of your forked repository without impacting the parent repo.

Is forking legal in GitHub?

The TOS states you agree to allow viewing and forking. It doesn't state that you agree to allow redistribution or use. If the terms don't explicitly state that you allow those things, then unless your license allows them they aren't allowed.


1 Answers

Yes, you are absolutely right. When i teach others GitHub, i would like to explain the concept via an example. Lets take a scenario in which the teacher is conducting an MCQ in his class. He usually make copy of the question paper and distribute it (Forking) to his students so that they can work on it and mark the correct answer. The teacher still has the master copy. On the completion of the test he can collect the copies from students so that he can assess it(Pull request).

Simply just like it. Forking is a concept of making copy of the main repository to your account so that you can make modifications in it. You can Submit pull request to the main repository with the modifications. It will make sure that the main repository is prevented from unwanted changes.

like image 147
Gautam Krishna R Avatar answered Oct 02 '22 14:10

Gautam Krishna R