Upload Your Project From Atom So That People Can See It
Share your open source project via GitHub
This article first appeared in issue 216 of .internet mag - the globe'due south best-selling magazine for web designers and developers.
When many people hear Git, they recall GitHub. GitHub is the pop online Git hosting service that has brought the power of social networks to the open source coding customs. And as more and more projects switch to Git and an increasing number of companies and individual developers move there to host their open and closed source projects, it's becoming ever more important to know how to participate in that customs.
GitHub has over 650,000 developers registered on the site, hosting more than 500,000 unique open source projects and i.8million full repositories. Companies such as Twitter, Facebook, Yahoo and Rackspace, amongst thousands of others, apply GitHub to share their open source projects and take contributions from the larger open source community. Many more companies use GitHub to outsource their code hosting needs or notice developers to hire – learning the site may be how you get your next job or what yous use when y'all go there.
Terminal week we introduced the Git Version Control tool and today nosotros'll wait at using GitHub. We'll meet how to create an account, add an existing projection to Git and push information technology to GitHub to share with the wider community. Finally nosotros'll learn how to contribute to someone else's open source project on GitHub. By the stop of this tutorial, yous should feel comfortable open sourcing new projects on GitHub as well as contributing to existing projects that you lot discover on GitHub.
1. Download Tower
If you don't even so employ Git, you can download the complimentary command line client at git-scm.com, or you tin can become one of the GUIs. Here we'll use Tower, a commercial Mac GUI client with a 30-twenty-four hour period trial that you lot can download from git-tower.com.
2. Import and commit code
Download the files from above. Unzip the file and initialise the directory as a Git repository. In Tower, click Create Local Repository then select your path. Yous can and then do your first commit past clicking Stage All so the Commit button.
iii. Create an account
Our first goal will be to push this code up to GitHub to share with people. To do this, create an account on GitHub if you lot don't yet have one. Go to GitHub.com/plans and click on the Create a Costless Account push then fill out the simple form.
iv. Create a new repository
To share your project, nosotros need to create a repository on GitHub. You should see a button titled New Repository on the dashboard you lot land on after creating an business relationship. Click on information technology and provide a project name in the next form to create your new repository.
v. Add together GitHub as a remote repo
In Tower, select Refs > Add together New Remote Repository and paste the HTML URL found on the project folio into the URL box on the grade that comes upwards. Then type in your GitHub password and click OK.
6. Push your lawmaking to GitHub
In Tower, right-click on the master co-operative in the sidebar and select Publish Branch. This pushes your work to GitHub, and so yous can go to your project folio and see your published piece of work. From now on you can merely click Push to share further updates.
7. Fork a repository
Nosotros have shared some lawmaking, so now we should contribute to a project. The first step to working on a project in GitHub is to fork it, ie get your own writeable copy. Go to GitHub.com/schacon/example and click the Fork button to accomplish this.
8. Clone that repository
In lodge to meliorate this project, we'll need to go a copy locally to edit. Select the HTTP URL from the project page and tell Tower to clone it for usa. Go to the Repositories page (command+D), click on Clone Remote Repository and paste in the HTTP URL.
ix. Brand a change
At present we want to add a feature, so nosotros should create a branch to do the changes in. Create a new co-operative (command+B) named new_feature and bank check information technology out. Then copy the two files from the original instance project into this forked repository and commit the new changes.
10. Publish your topic branch
Correct-click on the new_feature branch in the sidebar and select Publish Branch to publish information technology to GitHub. This will create a new branch named new_feature on GitHub that the original writer of the lawmaking you lot forked tin now see with all your new work.
eleven. Start a pull request
Since our piece of work is now public and on GitHub, we desire to tell the original projection writer to contain it into their project. This is called a pull asking. Become to the forked project page
and click the Pull Asking button to open up the form.
12. Fill in and inspect your pull request
Fill in a convincing title and clarification of why your work should exist incorporated. In the Commits tab you can encounter the list of unique commits you're sending. In the Files Changed tab y'all tin see the unified diff of what you're sending.
thirteen. See epitome differences
When an epitome is modified, GitHub enables you to use multiple views such equally side-by-side, swipe, onion skin and divergence so you lot can see how it was changed. Once you are happy with the alter, go alee and ship the Pull Asking.
Pull requests act as a code review procedure, and GitHub lets you have a chat well-nigh the changes before they are accepted. Go to the Files Changed view of the request you just sent and comment on a line of code.
15. View pull request give-and-take
Once you've commented, you can see the annotate and all other related information for the pull request on the main pull asking folio. Click on the Give-and-take tab to see how your comment and lawmaking context is now in the master give-and-take list.
16. View branch listing
At present that you have more than one branch pushed to your project, you can compare them with the Branch Listing view. If you click on Branch List under the Source tab you get a nice visualisation of all your branches and how many commits are unique to each.
17. Run into compare page
If y'all're interested in ane of the branches and desire to come across how it compares to your main branch, click the Compare button on the Branch List folio side by side to that branch. This will bring up a view of your changed files, a unified unequal and a listing of commits.
18. Your pull requests
To go along track of the status of your sent and awaiting pull requests for projects you take on GitHub, you can click on the Pull Requests tab from your Dashboard. Now that you're participating in a social coding network this is of import.
nineteen. Your contour
Now that you lot're an active and trained member of the GitHub community, brand sure yous're represented properly. Your profile page, found at GitHub.com/[username], is how people tin can see who you are and contact you. Be certain to upload an avatar at Gravatar.com and fill out your contour.
Good tip: The GitHub user interface is very dainty, only if you demand to do something different or repetitively, GitHub likewise has a lovely little API that enables you to exercise with a script only near annihilation you can practice through the spider web user interface. Visit develop.GitHub.com to learn more about how to script any of your GitHub interaction, including existing libraries to make it easy to do and then in Java, JavaScript, PHP, Perl, Python, Carmine and more. If GitHub doesn't exercise exactly what you desire, it's possible that you can bend information technology to your will.
Related articles
howardwitildrosen.blogspot.com
Source: https://www.creativebloq.com/netmag/share-your-open-source-project-github-12116614
Post a Comment for "Upload Your Project From Atom So That People Can See It"