John Blischak Update contribute-to-other-projects based on Emily's feedback.  about 9 years ago

Commit id: bc76c47f70577670b6a4093ef204d85f8c628f33

deletions | additions      

       

Now that you know the basics of Git, you can directly contribute to the scientific software you use for your research.  From a small contribution like fixing a typo in the documentation to a larger change such as fixing a bug, it is empowering to be able to improve the software used by you and many other scientists.  When contributing to a larger project with many contributors, you will not be able to push your changes with \verb|git push| directly to the project's remote  repository. Instead you will first need to create your own remote  copy of the repository.  Your copy of the repository is referred to as repository, called  a fork. You can fork any repository on GitHub by clicking the button "Fork" on the top right of the screen.  Once you have a fork of a project's  repository, you can clone it to your computer  and make changes just like a repository you created yourself. Let's say we created a fork of the hypothetical repository, "cool\_project", so that we could fix a typo we found in the directions in the README file.  In order to make changes, we first download it with \verb|git clone|. 

To merge this change into the main repository that is owned by the creator of the software, we send a pull request using the GitHub interface (Pull request -> New pull request -> Create pull request).  After the pull request is created, the owner of the original repository can review our change.  If she approves of the change, she can merge it into the main repository.  Although this process of forking a project’s repository and issuing a pull request seems like a lot of work to contribute changes, this workflow gives the owner of the project control over what changes get incorporated into the code.  The ability to use Git to contribute changes is very powerful because it allows you to improve the software that is used by many other scientists and also potentially shape the future direction of its development.