Jump to content

Fork and pull model

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by AndyChen201 (talk | contribs) at 20:09, 10 September 2016 (Challenges). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Fork and pull model refers to a software development model mostly used on Github, where multiple developers working on a open shared project make their own contributions by sharing a main repository and pushing changes after granted pull request by integrator users. Followed by the appearance of distributed version control systems (DVCS), Git naturally enables the usage of a pull-based development model, in which developers can copy the project onto their own repository, and push their changes to the original repository, where the integrators will determine the validity of the pull request. Ever since its appearance, pull-based development received large popularity within the open software development community. On Github, about more than 400000 pull-requests emerged per month on average in 2015[1]. It is also model shared on most collaborative coding platforms, like BitBucket, Gitorious etc. More and more functionalities are added to facilitate pull-based model, [1] including social media features, popular repositories code reviewing et al.

Reasons

Fork: When developers need to make contribution to existing projects, such as adding new functions or corrections, they need a temporary experimental develop environment to verify code qualities and make changes until it is accepted by the administrator of the project. Also, due to divergence on important issues, developers may want to have their own branch to develop.[2]

Fork and pull: The projects’ administrators decide whether the forks could be accepted to merge into the main branch by handle pull request. Accepted pull request represents quality and agreement among main developers which ensures successful cooperation on the same project.[3]

Examples

Specifically speaking, fork mainly means copy a repository from other users from Github onto your own project[4]. Pull request help you notify other collaborators on the same project with the changes you made to a repository, also with follow-up review and comment functions[5].

Let's go through the process of forking a repo and pulling a request.

1. fork a existing repo

2. clone to local repo

3. adding a remote

4. making changes

5. pushing changes

6. pull request

7. cleaning up

8. keep in sync


Challenges

Despite its popular usage, fork and pull model face certain challenges for its future development.

1.

2.

3.

See also

There are a few comprehensive tutorials towards the usages of fork and pull model.

References

  1. ^ a b YU, YUE (July 18, 2016). "Determinants of pull-based development in the context of continuous integration". Science China Information Sciences. 59 (8). doi:10.1007/s11432-016-5595-8. Retrieved 1 August 2016.
  2. ^ Nyman, Linus; Mikkonen, Tommi; Lindman, Juho; Fougère, Martin (2012-09-10). Hammouda, Imed; Lundell, Björn; Mikkonen, Tommi; Scacchi, Walt (eds.). Open Source Systems: Long-Term Sustainability. IFIP Advances in Information and Communication Technology. Springer Berlin Heidelberg. pp. 274–279. ISBN 9783642334412.
  3. ^ Gousios, Georgios; Pinzger, Martin; Deursen, Arie van (2014-01-01). "An Exploratory Study of the Pull-based Software Development Model". Proceedings of the 36th International Conference on Software Engineering. ICSE 2014. New York, NY, USA: ACM: 345–355. doi:10.1145/2568225.2568260. ISBN 9781450327565.
  4. ^ "Fork A Repo - User Documentation". help.github.com. Retrieved 2016-09-10.
  5. ^ "About pull requests - User Documentation". help.github.com. Retrieved 2016-09-10.