How to Create New Folder in Github Repository?

I’m often asked by new devs how to create a new folder in their GitHub repositories. In this tutorial, I will show you how to create a new folder in your GitHub repository so that you can keep your project organized.

 Create New Folder in Github Repository?

How to Create New Folder in GitHub Repository?

Creating a new folder in a GitHub repository is a simple process that can be accomplished in a few steps.

  • Step 1: Go to the repository in which you want to create a new folder and click on add file.
  • Step 2: Click on the “Create new file” button, typically found near the top right corner of the repository’s main page.
  • Step 3: In the “Name your file” text field, type the name of the new folder, followed by a forward slash “/”. (e.g. “new-folder/”).
  • Step 4: Leave the file contents blank and click the “Commit new file” button.

That’s it! You should now see the new folder listed in the repository, and you can add files to it by clicking on the folder and then clicking the “Create new file” button.

Read: Managing Git Subrepositories

Please note that creating an empty file with a forward slash in its name creates a new folder in the repository, but it will not appear as a standalone folder in the file explorer. Instead, it acts as a placeholder for other files and directories to be added within it.

Have you found this to be useful?

Sharing this article will help support my work.

Similar Posts

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments