/github-for-non-tech

How to organize folders inside a GitHub repo?

Learn how to organize your GitHub repo with our step-by-step guide to clone repos, create folder structures, add READMEs, and maintain a clean directory.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to organize folders inside a GitHub repo?

 

Step 1: Create a New Repository or Clone an Existing One

 

To start organizing folders, you first need a local copy of your GitHub repository. If you haven’t created one yet, head over to GitHub and initialize a new repository. Otherwise, clone an existing repository to your machine.

  • Initialize a new repository on GitHub via the web interface.
  • Clone your repository locally.
git clone https://github.com/your-username/your-repo.git
cd your-repo

 

Step 2: Plan Your Folder Structure

 

Before creating folders, map out how you want to organize your project. Common patterns include separating source code, documentation, tests, and assets.

  • src/ – application or library source files
  • docs/ – markdown documentation or design specs
  • tests/ – automated tests, fixtures, and test data
  • assets/ – images, logos, or other media
  • scripts/ – utility or deployment scripts

 

Step 3: Create Folders Locally

 

Use the mkdir command to create folders in one go. The -p flag lets you build nested directories in a single command.

mkdir -p src docs tests assets scripts

If you need deeper nesting, run:

mkdir -p src/components/header
mkdir -p src/components/footer

 

Step 4: Add README Files to Each Folder

 

Including a README.md in each major folder helps explain its purpose to contributors.

touch src/README.md
touch docs/README.md
touch tests/README.md
touch assets/README.md

Inside each README, document:

  • What the folder contains
  • How files inside it are organized
  • Any conventions contributors should follow

 

Step 5: Stage, Commit, and Push Your Changes

 

Once your folders and README files are in place, add them to Git, commit with a clear message, and push to GitHub.

git add .
git commit -m "Initialize organized folder structure"
git push origin main

 

Step 6: Verify the Structure on GitHub

 

Open your repository on GitHub and navigate through the folders to ensure everything appears as expected. You should see your top-level folders and their respective README files.

  • Click on each directory in the web UI.
  • Confirm that nested folders are displayed correctly.
  • Review README previews to verify formatting.

 

Step 7: Maintain and Evolve Your Folder Organization

 

As your project grows, revisit your structure periodically. Keep directories focused and avoid deeply nested hierarchies that become hard to navigate.

  • Refactor poorly named folders or relocate files when patterns emerge.
  • Archive or remove unused directories to reduce clutter.
  • Update README files to reflect any structural changes.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022