One place for hosting & domains


      Hacktoberfest: How to Submit Your First Pull Request on Github


      Hacktoberfest is a month-long celebration of open source software, run by DigitalOcean and open to everyone in our global community. To participate, you’ll need to submit four quality pull requests to public GitHub repositories in the month of October. Upon completing the challenge, you’ll earn special prizes, including an exclusive Hacktoberfest t-shirt.

      You can sign up anytime between October 1 and October 31, and we encourage you to connect with other developers and Hacktoberfest enthusiasts for virtual events and information sessions, starting in September.

      In this tutorial we’ll introduce you to Git, the version control system that you’ll use to submit your pull request, and Github, the repository hosting service that we’ll be using to track your progress. By the end of this tutorial, you’ll be ready to submit your first pull request and will be well on your way to participating in Hacktoberfest!

      Version Control

      Before we begin with Git and Github, let’s talk about version control. When developers work on a project together, oftentimes they’ll need to work on the same code base. While they’re working, each developer needs to know about what changes the other developer made, so as not to duplicate work or write code over what has already been done.

      A version control system serves as a saving program for code, where it assigns a version to a project and tracks changes made over time to each file in the project. In this way, developers can work together on a project by checking in with the latest version, to see the changes made before working on their portion of the project’s code.

      Git and Github

      Git, a version control system used to manage developer projects of all sizes, was created in 2005 by Linus Torvalds, the creator of Linux, to help developers contribute code and share code revisions in a way that was fast, efficient, and inexpensive. Git enables developers to edit, share, and publish code, facilitating collaboration and teamwork.

      Github is a cloud-based git repository hosting service that allows developers to take code that they’ve written on their local machines and share it with the world. It provides a way to share the version-tracked projects on your local computer publicly through repositories, or central file storage locations, and depending on the project’s availability (it can be either a public or private repository), other developers can download the project to edit the code, provide insight, and more.

      To get started with Github, you can create an account at Github. For more details on how to do that, please refer to the Hacktoberfest resources page.

      Cloning a Repository

      We’ll now clone and edit our first Github repository. First, let’s navigate to the repository that we’d like to clone. For the sake of this tutorial, we’ll use the Cloud Haiku repository.
      Before you clone this repository, that is, take a copy of the code on Github onto your local machine, you’ll need to take a copy of the whole repository into your own Github account. This is called a fork of the repository, and it allows you to develop your code without affecting the main code base.

      To fork a repository, click the Fork button at the top right in the repository. To clone, click the code button, take a copy of the link provided, then watch as Github takes this repository and adds it as a copy to your account. Your name should now appear as the creator of this repository, which is a ‘fork’ of the main haiku repository.

      Clone the repository

      Next, navigate to your command line interface to clone the project on your local machine.You can do that with the git clone command, which will clone, or copy, the fork that I just created from the haiku repository down to my local machine. This will enable you to make changes to the codebase locally (on your own machine).

      • cd ~
      • git clone

      Editing Code Content

      You now have a copy of the Cloud Haiku repository on your local machine, so you’re ready to prepare your contribution. Using the command line interface, navigate to the folder of your cloned repository. If you followed along, you should have a cloud_haiku folder inside your home directory:

      There’s a number of text editors and Integrated Development Environments (IDEs) that you can use to edit your code. IDEs are typically segmented by programming language and include a series of helpful features to streamline the process of developing an application in that language. If you don’t have an IDE currently set up within your work machine, consider checking out Hacktoberfest’s resources page for advice on how to choose an IDE.

      It’s important to take the time to read and understand how the project is organized and the contribution guidelines, and find parts of the code that you can work on. Read any associated documentation provided before making changes. Next, let’s submit a haiku!

      Browse the Codebase

      Adding Content to the Remote Repository

      Now that we have a change made to the haiku repository, we’ll need to track and save that change. The first step in tracking your change is to add it to the version you’re working on. To do that, we’ll execute the command git add . :

      Writing the command in this way allows you to add all changes made to the repository, across files. If you need to only submit changes to an individual file, use git add filename:

      After running the add command, you’ll get no confirmation. To see if your changes have been included in the list of files that is ready to be committed, you can execute the command git status:

      This allows you to check on the status of your tracked changes — you’ll see that your file has been added, but not committed as a change. Git provides this step in the event that you need to amend a change before officially tracking it as new or edited code.

      Git Add

      Next, let’s commit our change. Execute the command git commit, and add a message so that other developers who are collaborating on this project will know about the changes you’ve made:

      • git commit -m "added sammy haiku"

      Writing your commit with a message allows developers to be informed of changes that are made — this message is tracked along with a commit ID and your username.

      Git Commit

      After committing, we’ll need to push changes from our local machine to the remote repository on Github. To do this, let’s execute the command git push:

      Here, we can designate an origin for the push — in this instance, we want our contributions to go to our forked version of DigitalOcean’s haiku repository.

      Git Push

      To recap, so far we’ve identified a repository that we’d like to edit, and took a copy of the repository into our Github account and local machine using fork and clone. We made a change, and submitted our change with git add. We then solidified our change by running git commit, which committed the change. git push pushed our change from our local machines to the remote repository on Github. If we look on Github, we’ll see that the change we made is reflected in the files in our copy of the haiku repository.

      Creating a Pull Request

      We’re now ready to let the maintainers of the project know that we have a change to the repository that we’re confident about and ready to submit. To do this, we’ll click the pull request button to the right.

      Submit a PR

      After the pull request button is clicked, a new page will open with a form that explains what change we made, and shows if the changes made will in any way conflict with the existing content. We’ll add in an appropriate title that details the change, and in the description add an explanation of what changes were made and why. What you add here can vary depending on the project – take a look at the project’s collaboration guidelines to make sure your pull request is formatted correctly.

      After adding in a title and description of the changes made, we’ll scan the pull request page to make sure that our committed change does not conflict with existing changes made to the code repository. If everything checks out, we’ll get a green submit pull request button at the bottom that escalates our request to make a change to the original haiku poem codebase, a contribution that will be live for anyone viewing that main branch. Be patient — it may take maintainers some time to review your request. Amendments and comments can be added on the pull request page, and new commits made to the same affected files will appear in the request’s history.

      Congratulations- we’ve successfully submitted our first pull request!

      In this tutorial, you learned about Git and Github, and successfully identified and submitted a change to a public repository. For Hacktoberfest, you’ll need to submit 4 meaningful pull requests, so again, find the project that resonates with you and have fun hacking!

      To see this tutorial in action, here’s a helpful video that walks you through the process of submitting your first pull request:

      Video: How to Submit Your First PR

      For more information about Hacktoberfest, visit our main page.
      To learn more about Git, visit How to Use Git: A Reference Guide.
      For additional information about Github, visit Github.

      Source link

      Hacktoberfest Contributor’s Guide: How To Find and Contribute to Open-Source Projects


      Contributing to open source software is not only a way to share your skill in a particular language or tech stack, it can be a rewarding practice to share your engineering knowledge and collaborate with the developer community. Although there’s a wide range of open source projects out there waiting for your expertise, knowing where to find them and how to contribute in a way that is meaningful to the project can sometimes prove to be a barrier for interested contributors.

      In this Hacktoberfest-flavored guide, we’ll share some tips and information that will aid in finding and contributing meaningfully to open source projects.

      Find a Project

      If you are new to engaging with the open source community, finding a new project to contribute to may feel daunting. Here’s a few resources and ideas to help you find a project you’d love to help thrive.

      What is Open Source?

      Open source software is software that’s freely available to use and modify, typically shared via a public repository hosting service like Github. Projects that follow the open source model usually thrive through contributions from the developer community, and may allow for redistribution depending on which open source license they have adopted.

      Most successful open source projects have transparent, well-delineated processes for maintenance and improvement, which helps to build a community around them. As a result, they benefit from regular contributions from end-users, who bring with them diverse perspectives to solutions that may otherwise be overlooked.

      To learn more in detail about open source, visit our tutorial series, An Introduction to Open Source.

      Consider Familiar Open Source Software

      After deciding to commit your time and talent to an open source project, it’s important to take a moment to consider your passions and the type of project that resonates with you. Considering that you may spend a number of hours contributing to a specific project, you want to select a project that is not only something you’d personally use, but have a deeper interest in beyond contributing for Hacktoberfest. Think about the software you use today and consider the following:

      • In what tech stack and language is the software written?
      • What are some things that could be improved when using the software?
      • Are there any bugs or visible errors that you have the technical proficiency to address?
      • Would you be willing to contribute to this software on an ongoing basis?

      These beginning considerations may lead you to discover that your favorite software is open source and waiting for your contribution. If that’s the case, be sure to dive into the CONTRIBUTING.MD file that typically delineates how to contribute before starting. This resource will usually introduce you to the codebase, conventions, and ways to gain support when contributing to the software.

      Beginner-Friendly Open Source Projects to Try

      If you’re just starting out, the idea of committing large amounts of code to an unfamiliar codebase could bring out the imposter syndrome that lies dormant in many of us. Luckily, each developer was a beginner once, and to foster appreciation and adoption of open source, there’s a wealth of publicly-available repositories shared by fellow developers that are beginner-friendly. Here’s a few that we suggest to browse:

      • Awesome For Beginners- A list of projects by programming language that are noted to be beginner-friendly.
      • Awesome for Non-Programmers- if you’re new to programming, here’s a list of projects that are language-agnostic and help foster learning.
      • Up For Grabs- A resource that lists projects with tasks curated for new contributors.
      • First Timers Only- A resource for beginning contributors that includes links to open source learning resources and links to beginner-friendly projects.
      • Habitica- A habit-forming app that gamifies life. This open source project has detailed documentation and many ways for programmers and non-programmers alike to contribute to the project.

      More resources for open source projects to try can be found on our Hacktoberfest Resources Page.

      Make a Contribution

      Identifying Meaningful Solutions for Open Source Projects

      After identifying an open source project to contribute to and diving into the resource material that the codebase offers, you may be wondering exactly what to contribute. While the way in which you contribute may vary by project, here’s some general ideas of contributions that are impactful and meaningful to the codebase and software you’re working on.

      Fix a Bug

      Bugs are small errors in code that may cause an annoyance, a blocker, or be debilitating to software. Bugs often produce unexpected results that cause incorrect responses or actions — for the sake of a software user’s experience, it’s imperative and important that a codebase is maintained to be bug-free (or as bug-free as possible).

      You can contribute your knowledge and expertise to ‘squash’ or solve the issue surrounding a bug. By working on bugs of varying priorities, your ability to strengthen a codebase by solving errors will grow, and you’ll have a meaningful contribution to add.

      Propose a Feature

      Open source projects benefit from a diversity of thought. Although software may have been developed by one or more engineers with an opinion of how their product can solve an existing problem, your personal experience and outlook on how to improve a project can be invaluable. Once you’re comfortable with a project’s codebase and understand how it works for end users, try to think of a new feature that could be useful or improve the user’s experience and create an issue to propose it to the project maintainers. It is important to have this conversation before investing time in writing code, since sometimes your idea might not coincide with the project’s roadmap. With a positive response, it’s time to implement your idea and bring that feature to production.

      Write Some Documentation

      While there may be a wealth of technical contributions that can be made to a codebase, writing good documentation is a contribution that is often overlooked. If you’re linguistically-inclined or speak a language other than the one reflected in the initial documentation, consider making a contribution. Contributions in documentation can revolve around providing editing help to an existing doc or authoring new pages within the documentation. Refer to your project’s contribution guidelines to learn more about how to contribute this and other non-technical help.

      Submit Your PR

      Submitting Your Pull Request via Github

      After you’ve made a meaningful contribution to an open source project’s codebase, it’s time to submit your pull request. We’ve created a helpful video that walks you through this process via Github, that can be found here.

      Video: How to Submit Your First PR

      Sharing your expertise with an open source project is a rewarding experience that allows you to practice your talent, collaborate with and learn from others, and give back to the developer community. While it may initially seem daunting to find your place within the open source community, finding a project that speaks to your passions and contributing meaningfully to its codebase is a great way to start.

      For Hacktoberfest, while making four (4) meaningful contributions to open source projects will qualify you for prizes, we hope that you’ll continue to enjoy the benefits of contributing to the open source community well beyond the event. For more information or to learn more about open source, Git, or Github, you can visit the Hacktoberfest resources page. Happy hacking!

      Source link

      Hacktoberfest Workshop Kit: How to Submit Your First Pull Request on Github

      How To Submit Your First Pull Request on GitHub Workshop Kit Materials

      This workshop kit is designed to help an instructor guide an audience without a background in version control or contributing to open source projects through the steps of submitting a pull request from start to finish in roughly thirty minutes. Attendees will finish the workshop with an understanding of version control, open source, Git, and GitHub.

      No prior coding experience is assumed on the part of the audience. Instructors without experience in open source, Git, or GitHub should be able to teach the course after reviewing the material first.

      The aim of this workshop kit is to provide a complete set of resources for a speaker to host a workshop about version control and contributing to open source projects. It includes:

      • Slides and speaker notes that lead participants through setting up their website project, hands-on exercises, and conceptual explanations.
      • A video with a live coding walkthrough of submitting a pull request, tips, and conceptual information about version control and contributing to open source projects.
      • A demonstration repo to allow participants to contribute to an open source project as they follow along in the workshop.

      This workshop kit page is intended to help instructors prepare for the workshop and provide a starting point for learners. Instructors should point learners to this page so they can have access to the slides (which contain useful links).

      If desired, learners can prepare for the workshop by reading the introduction below and making sure that they have the prerequisites ready before the workshop starts.

      If you are interested in participating in this year’s Hacktoberfest, this workshop is a great place to start! This project-based workshop will introduce you to open source, version control, Git, and GitHub using the Cloud Haiku repository as a model. Once you learn the fundamentals, you will know how to contribute to open source projects and submit a pull request on GitHub. No prior coding experience is necessary to follow along in the workshop.

      When software developers work on a project together, oftentimes they’ll need to work on the same code base. While they’re working, each developer needs to know about what changes the others made to the code, so as not to duplicate work or write code over what has already been done. Git, a version control system used to manage developer projects of all sizes, was created in 2005 by Linus Torvalds, the creator of Linux, to help developers contribute to code and share code revisions in a way that was fast, efficient, and inexpensive. Git creates code repositories to help developers edit, share, and publish code for all. GitHub is a cloud-based Git repository hosting service that allows developers to take code that they’ve written on their local machines and share it with the world.

      With Git and GitHub, developers from all over the world collaborate on all sorts of projects — many of the websites you visit regularly are maintained using GitHub. Knowing how to use Git and GitHub, and learning how to contribute to open source projects will provide new developers with a strong start in gaining the skills they need to join the software engineering community at large.

      In this workshop, we’ll introduce you to Git and GitHub, the version control system that Hacktoberfest uses to track your progress, and the repository hosting service that shares projects to collaborate on. By the end of this tutorial, you’ll be ready to submit your first pull request and will be well on your way to participating in Hacktoberfest!

      To participate as a workshop leader or learner, you will need the following:

      • A code editor. In this workshop, we’ll be using Visual Studio Code, which you can download for free for Mac, Windows, or Linux.
      • A web browser. In this workshop, we’ll be using Google Chrome as our default browser, which you can also download for free for Mac, Windows, or Linux.
      • A GitHub account. In this workshop, we’ll make a contribution to an open source repo on GitHub. You can sign up for a free account using your default browser.

      Once you have your prerequisites ready, you will be ready to begin the workshop. Refer to the speaker slides for helpful links after the workshop or watch the How to Submit Your First Pull Request video on the Hacktoberfest resources page to review.

      Source link