Beginners Guide to Hacktoberfest
Tags: hacktoberfest, codenewbie, github, beginners
Published: 2020-09-28 00:53:24

###Contributing to open source is a great way to gain experience and confidence as a developer. 
Anyone can create an open source project, but examples of major open source projects include Dev.to, Facebook's React.js, and Microsoft's VS Code. 

[**Hacktoberfest**](https://hacktoberfest.digitalocean.com/) is a great time to get started with open source because there are so many resources and projects that are welcoming new developers.  


![get-started-gif](https://media.giphy.com/media/3h4Bo5fja4ZgYS0WEg/giphy.gif)


_____________________________________________________________

**Table of Contents**
* [Key words to help you get started](#keywords)
* [Find an Open Source Project](#projects)
* [Git practice for total beginners](#gitpractice)
* [Make your first Hacktoberfest Contribution](#firstpr)
_____________________________________________________________


**Key Words:**<a name="keywords"></a> 


![what-does-that-mean-gif](https://media.giphy.com/media/l3q2TS4hLhi3rPBYI/giphy.gif)


    
    let keywords={                                        
                                                          
    git: "A version control system that tracks 
       file changes",

    Github: "A website that uses git to save and track coding 
       projects",

    Hacktoberfest: "A month long celebration of open source 
       hosted by DigitalOcean",

    maintainer: "The person that owns the upkeep and 
       communications for an open source project.",

    mergePullRequest: "When your contribution is approved, 
       the maintainer will merge or add your code to the 
       original project",

    openSource: "Publicly accessible code",

    pr: "PR, or pull request, is a request to add changes to 
       an existing code base.",

    repo: "A repo, or repository, is a code project"}


_____________________________________________________________

**Find an Open Source Project**<a name="projects"></a>

![project-gif](https://media.giphy.com/media/26gs78HRO8sOuhTkQ/giphy.gif)


For 2020, Hacktoberfest is requiring 4 open source contributions. Once you have found a repo you want to contribute to, make sure it meets the [quality standards](https://hacktoberfest.digitalocean.com/details). Not sure where you want to contribute? There are several ways to find projects:


1) Search for some Hacktoberfest key words directly in GitHub (ex. Hacktoberfest, first-timers-only, beginner-friendly)


2) Contribute to an open source website or technology that you already use in your tech stack (i.e. Dev.to, Women who code, React.js) 


_____________________________________________________________



**Is this your first time ever making a pull request?**<a name='gitpractice'></a> I recommend getting comfortable with git by practicing on your own repo:

*Practicing making a PR on your own code is a great way to learn the process with the assurance that you won't mess up anything.* 😅

1) Make a practice repo. 

![Practice repo](https://dev-to-uploads.s3.amazonaws.com/i/09ppiyc4f3w6z8ezk2f1.png)

2) On your terminal, make a new directory for your practice repo and add a README file. This will act as our original project. Next, we'll make a pull request to add a new file to the original.

Run the following in your terminal: 

mkdir pr-practice
cd pr-practice
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/*insert-your-github-username*/pr-practice.git
git push -u origin master

3) We now have our practice open-source project on GitHub. We are going to make a pull request to add a new Hello World file. In your terminal, run the following: 

git checkout -b newbranch
git remote add upstream https://github.com/*insert-your-github-username*/pr-practice.git
touch HelloWorld.js
git add HelloWorld.js
git commit -m "Adds new Hello World file" 
git push -u origin newbranch

4) Refresh the repo on GitHub and click "Compare and pull request." 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ft1n4t8a9zfkmcczc1hz.png)

5) Make sure that the base is your master branch (the original project with our README file) and the compare branch is the new brach we created with the Hello World file. The title of the merge request should be a brief description of the changes.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ol1b10lsrzpvgukfuzhf.png)

6) If there are no conflicts with your pull request, go ahead and merge the new code with your original project by clicking "Merge pull request" & "Confirm merge"

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wsealmq2oincjin04uql.png)

7) Congratulations! You have merged your new file.

![alexis-rose-happy](https://media.giphy.com/media/U4dmUBCl91Q5bIq18A/giphy.gif)

_____________________________________________________________


**How to make your first contribution for Hacktoberfest:**<a name='firstpr'></a>
 
*So, you're ready to make your first open source contribution (yay)!*👩🏿‍💻


*There are a few extra steps you'll need to take when submitting a pull request on an open source project. Before you start writing code, make sure to sign up [here](https://hacktoberfest.digitalocean.com/) so that you contributions count* 

1) Check out the repo's README to see if they have any syntax (style) standards that you need to follow. Click on the "issues" tab of the repo to get an idea of where you may be able to contribute.

2) Fork the repo: The first step is to "fork" or copy the current version of the project. When we fork a repo, we get a copy of the code that we can edit on our own computer without impacting the original code. 

You can think of this like the "save a copy" feature in Excel. When someone sends you an excel file and it comes to you as read only, you have the option to edit the file. When you edit and save a copy of their original file, it is updated on your computer only. 

![fork-repo](https://dev-to-uploads.s3.amazonaws.com/i/4bt3ppw9hefjrwz1agic.png)

2) Github will take you to your forked repo. Copy the link to the repo so that we can start coding: 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ar99i69tiopack0gprcf.png)

3) In your terminal run the following using a directory-name that describes your project: 

mkdir directory-name
cd directory-name
git clone copied-fork-repo-link
cd repo-name
git checkout -b newbranch
git git remote add upstream copied-fork-repo-link

4) Time to code! 

5) When you are ready to commit your changes, go back to the terminal and run the following: 

git add new-file-name *(if applicable)*
git commit -m "Description of your contribution"
git remote add origin copied-fork-repo-link
git push -u origin newbranch 

6) Go back to your repo on Github. You should see the option to submit a pull request: 

![Example pr](https://dev-to-uploads.s3.amazonaws.com/i/ft1n4t8a9zfkmcczc1hz.png)

5) Make sure that the base is the original repo and the compare branch is the new brach you created on your own repo. The title of the merge request should be a brief description of the changes. Click Create pull request to submit.

![Example open source merge](https://dev-to-uploads.s3.amazonaws.com/i/unw1biaqlwnr3ncanqub.png)


6) Now we wait to hear from the maintainer! When it comes to making an open source contribution, you need to be aware that not all PR requests get approved. It is also common for the maintainer to send you some feedback of things you need to change before your contribution is merged. 


![done!](https://media.giphy.com/media/dwAMmklywWNIfzr3vD/giphy.gif)
_____________________________________________________________


Disclaimer: Learning how to use the command line & learning how to use GitHub can be really challenging at first!  The most important thing to remember is that pretty much any mistake you make can be reversed. 🙌🏽 Even for experienced devs, practice makes perfect when it comes to using GitHub.