banner



How Do I Upload Homework to Github

Making a alter to open up source code can be a rush.

Recently I was working on software to provide a console command-line interface for users to interact with the NodeJS API customer for HPE's Operations Orchestration product. I realized I needed to use a library someone else wrote to parse all the arguments and display a nice command usage output. Something like this:

Command usage output screenshot

I began searching for a library to use in npm, the largest repository of open source NodeJS packages. Among npm's most popular libraries is command-line-args. I gave it a try and found it had virtually everything I needed, including tests and lawmaking coverage. It's also well-maintained with frequent releases. Then, I hit a snag. I wanted to add some description to my control arguments, but couldn't find annihilation in the documentation about information technology. Later on inspecting the source code a bit further, I plant references to a description property that could be configured.

Smashing, right? I plant the solution to my problem, and I'thousand done.

Well, non exactly. What if someone else has the same problem in the hereafter? They might non be able to find the solution and rule out this library because it doesn't seem to support a description configuration. Open source software works best when we pay things forward, so when you find something that can be improved, take the next step to ameliorate it yourself.

3 easy steps to submit a pull request on GitHub

i. Create your own copy of the code repository by forking the original.

While logged in to GitHub and browsing the repository folio for the project, locate and click the Fork push button at the top right of the page. Your new personal repository will be created.

At this point, you tin can brand whatsoever modifications you wish and suggest them to the parent repository you forked from. Y'all can either clone the new forked repository on your own reckoner or edit files through the GitHub UI.

If y'all don't take a preferred Git UI tool only you do accept Git installed, the following command will clone the repository to a local directory:

                                    git clone              <repository>                              

ii. Make changes to the required file on your new forked repository.

If you want to brand simple changes to things similar README files, y'all can hands do this editing from GitHub's spider web site. To practise so, locate the file you lot wish to edit and click on it to view information technology. Then, locate the pinnacle right pen icon to edit the file right in the browser. Make any changes you wish, add a commit message, and click Commit.

If yous need to make modifications to files on a local cloned repository so after you're done making changes, don't forget to commit the files:

          

git add .
git commit -m "a commit message"

and so push button the changes to your remote repository on GitHub:

                                    git push button              origin                  

3. Create a pull request to merge and incorporate your changes into the original repository.

Creating a pull request allows upstream repositories (the original projection you forked from) to accept your suggestions for improvements and fixes.

To create a new pull request, only locate the dark-green push button on your repository project page chosen New pull request and you'll be presented with the list of changes you've made on your personal forked repository. On the top of the pull request, the base project is the upstream repository which you forked from. The page will prove full listing of changes to each file (a unequal) which you lot can review. To proceed, click on the green Create pull asking push and confirm the title and clarification. Then merely submit it and y'all're done!

Your contribution will be sent to the project maintainer.

GitHub comment screenshot

I should note that the maintainer may non choose to incorporate your contribution for any number of reasons, including lawmaking style standards and commit message guidelines. Information technology is also possible that the projection isn't actively maintained anymore and yous will non become attention from the maintainers. For this reason, it'southward always best to consult a file unremarkably establish in projects called CONTRIBUTING.md, which provides guidelines for how to contribute code dorsum to the project. Of course, yous'll too desire to brand sure the project is still maintained and ready to have contributions.

What has your experience with submitting changes to open source repositories been? Do you have whatsoever advice to give? Let us know in the comments.

Creative Commons LicenseThis work is licensed nether a Creative Eatables Attribution-Share Akin 4.0 International License.

sonthavivelball.blogspot.com

Source: https://opensource.com/life/16/3/submit-github-pull-request

0 Response to "How Do I Upload Homework to Github"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel