User:AndyChen201/sandbox

Fork and pull model refers to a distributed software development model mostly used on Github, where multiple developers working on a open online project, make their own contributions by cloning a main repository on local repositories and pushing changes after creating pull request first for other users to review and comment. Followed by the appearance of distributed version control systems (DVCS), pull-based development model was naturally developed by Git after various other code integration methods. Ever since its appearance, pull-based development received large popularity within the open software development community. On Github only, about more than 400,000 pull-requests emerged per month on average in 2015. It is also a model shared on most online code collaboration platforms, like BitBucket, Gitorious etc. More and more functionalities are added to facilitate pull-based model these days, including social media features, popular repositories code watching and reviewing et al.

Reasons
There are a few motivations for programmers to use fork and pull request methods.

Fork: When developers need to make contribution to existing projects, such as adding new functions or corrections, they need a temporary experimental development 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.

Pull request: Administrators of the projects 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.

Procedures
Specifically speaking, fork mainly means copy a repository from other users from Github onto your own project. 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.

This is the process of forking a repository and pulling a request.

1. Fork a existing repo

After creating an account on Github, you can fork any public repository simply by clicking the fork button.

2. Clone to local repo

After forking the main repository, you can clone it onto your own repository. First, click the clone or download button from your Github account. Then in your own terminal, you should type in the code below to clone the repository onto your own computer.

After typing the enter, you local repository will be added.

3. Adding a remote

4. Keeping up to date

After you set up the remote, you may always keep you local repository up to date, by using the command below, This is a regular procedure when you feel not reading pushing up your changes online, but still want updates from resource code in order to prevent uploading anything duplicated.

5. Making changes

You can push the changes you made in new branch on the original repository by typing:   The NEWFEATURE branch is where you make new changes you want to push onto the upstream code.

6. Pushing changes

After you have committed your work to the local branches, you should synchronize the GitHub by pushing. 7. Pull request

After you pushing the changes on Github, it will ask you to make a pull request, or you can find the pull request button on the workplace for your account on GitHub.

8. Cleaning up

If the integrator has accepted and merged your work into the main branch, you can clean up your works.

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

Technical challenges: To ensure the quality of project, administrators have to be responsible for the code reviewing. More pull requests will bring more complex errors and uncertainties. Situations will get worse when there are not enough reviewers.

Social challenges: Copious pull requests bring administrators trouble of handling and prioritizing. Furthermore, explaining rejection as well as asking for more work from contributors which may breed discontent are also big challenges for administrators.

Some studies are specially concerned about the troubles facing from the contributors and the integrator using the pull and fork model. The motivation from the contributors to generate pull request and the rationale from the integrator to manage pull request merges are two pivotal factors for usage of the model, however they are also the get the most criticisms.