- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
4 weeks ago
In this article, I’ll walk you through a step-by-step process to successfully contribute to a Hacktoberfest Level 1 Code Snippet project. 🧩
All you need is:
- A GitHub account
- Some creative ideas 💡
- And your enthusiasm to contribute and grow together 🚀
Step 1: Open the Original Repository
To begin your Hacktoberfest Level 1 contribution, open the official Code Snippet repository where all contributions are made.
👉 Click here to open the repository
Step 2: Fork the Repository
Click on Fork in the top-right corner of the repository page (as shown in the screenshot).
 This will create a copy of the repository under your GitHub account where you can make your changes.
A page appears after clicking Fork:
A photocopy of the original repository is now available in your GitHub account for you to work on. 🎉
Step 3: Create a New Branch
Click on the Branch -> New branch
Type a name for your new branch (for example, my-first-contribution), and make sure the source is the code-snippet-copy repository and the main branch.
Once the branch is created, you’ll see it listed under branches. Click on your newly created branch (e.g., my-first-contribution).
Step 4: Sync Your Fork
Verify that you’re in the correct branch before you start contributing. Sync your fork to make sure it’s up to date with the latest changes from the original repository. Click on Sync fork → Update branch in your GitHub fork.
Step 5: Make Your Contribution and Commit Changes
Before you start, make sure to read the README and CONTRIBUTING file thoroughly to understand the guidelines and best practices for contributing. This will help ensure your contribution is correct and accepted.
Add your code snippet or update the file as required.
 Once done, click Commit changes, add a short and meaningful commit message, and save your work. 
Step 6: Create a Pull Request
Once your changes are committed, go back to your code-snippet-copy repository.
 You’ll see a Compare & pull request button. Click on it to start submitting your contribution. 🚀
Step 7: Submit Your Pull Request
After clicking Compare & pull request, the Open a pull request Page appears.
Verify the repositories:
- Enter the title to your pull request
- The description is already filled, so simply check the checkbox if required.
- Click Create pull request to submit your contribution. ✅
Step 8: Contribution Submitted
Congratulations! Your contribution is now submitted. 🎉
For your next contribution, simply:
- Go back to the main branch of your repository.
- Create a new branch from it.
- Start your next set of contributions following the same steps.
Keep contributing, learning, and growing together! 🚀
Happy Hacking!
If you found this guide helpful and want me to create similar step-by-step guides for Hacktoberfest Level 2 and Level 3, please leave a comment below. I’d love to help you continue your Hacktoberfest journey! 🚀
- 1,143 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is very helpful.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi  @Juhi Poddar ,
Thanks for the article , really helpful.
Could you please provide steps for Step 5 where REAMED & contribute is important. How can access 
README file and include comments in the JavaScript file for Code Snippet ?
is the similar way  have to perform Level 2, Level 3 ? If possible please provide some steps.
Can we send 6 pull request for Code snippet ?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
You’ll need to create a separate README.md file for your contributions. This file should include details about your contribution. (Here, .md stands for Markdown).
To add comments in your JavaScript file, make sure you’re on the correct branch. Then, locate your code snippet file, make the necessary changes, add comments, and commit them.
Level2 and level3 is a bit different where you need some understanding of source control.
And yes, you can submit up to 6 pull requests for code snippets alone.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Juhi,
If I want to contribute how I can create a folder it is showing me to create a file only, I'm not able to create a folder, can you please guide me in this.
Thanks,
Sarthak
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Sarthak Kashyap,
You’re very close to the solution! 🙌
When you click “Add file”, you’ll see an option to enter the file name. There, you can specify both the folder and file name together.
Example:
Folder name: Add comments
File name: script.js
In this case, type it as:
👉 Add comments/script.js
This will create a new folder Add comments with file script.js
Hope this helps!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for your response Juhi,
I clicked on create new file
Now here I'm not able to see any option to create a folder
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @Sarthak Kashyap
Add the folder name/file name in the box shown in the screenshot.
For example:
👉 Add comments/script.js
Also, from the screenshot, I noticed you’re working directly on the main branch.
Please create a new branch and make your changes there. The steps are explained in detail in the article. 😊
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Juhi Poddar ,
I have tried for action pack, Please check attach screenshot . After that what steps need to do ? Could you please assist.? The branch is 1 commit ahead . Shall we need to create new branch or main branch ?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @abirakundu23
It looks like you have made your contribution directly on the main branch. Main branch should be the copy of original repository. Please create a new branch and do not make any changes to the main branch.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Juhi Poddar - This is a great guide, I had some additional things that I learnt along the way that might be worth including in your article:
Add Files in Your Fork (Web Browser)
From your fork, select Add file → Create new file.
To make a folder, type the path in the filename box, e.g.
my-folder/README.md.
Add your content. Scroll to the bottom and click Commit new file.
Write a short, clear commit message — e.g. Add example script include.
Each file or edit you save creates a new commit, which is just a snapshot of your change.
Add More Files to the Same Folder
Open the folder you just created.
Click Add file → Create new file again.
Use the same folder path, such as my-folder/code.js.
Commit again — both files now live in the same directory.
Cleaning and Managing Changes
If you’ve added or edited files you don’t want in your PR:
Delete a file: open it, click the trash bin icon, add a commit message, and commit.
Revert a file: view its History, open the previous version, and restore it with a new commit.
Every commit you make updates your pull request automatically.
Reopening a Closed Pull Request
If your PR was closed but not merged:
Go to the repository → Pull requests tab → Closed.
Open your PR and click Reopen pull request.
If your branch was deleted, recreate it in your fork first.
Resetting Your Fork (When Your PR Is Rejected) (And you forget to branch)
Sometimes a PR is rejected or your fork becomes messy. The “Sync fork” button only adds missing commits — it doesn’t remove yours. Here’s how to clean it properly.
Option 1: Codespaces (Recommended)
Open your fork → click Code → Codespaces tab → Create codespace on main.
In the terminal, run:
git remote add upstream https://github.com/ORIGINAL_ORG/REPO.git
git fetch upstream
git checkout main
git reset --hard upstream/main
git push --force-with-lease origin main
Refresh your fork. It should now say
“This branch is up to date with ORIGINAL_ORG:main.”
Hope this helps others who are new to the world of Github!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks @Juhi Poddar This is really helpful .
