Create a New Folder in a GitHub Repo

While many people use GitHub to host their code while they work with git on their system, I find it convenient at times to work directly on the GitHub web interface.

If you are like me, you will find this quick tip where I share how you can create a new folder directly from the web interface of a GitHub repository.

Creating a new folder in GitHub is quite easy, but unintuitive as there is no option like "Create New Folder". And you can't create an empty folder directly in GitHub.

Instead, you need to open the "Add File" dropdown in the Repository's GitHub page and click the "Create new file" button.

After clicking on it, you will have to type the directory name and put a forward slash (/) just after it. This will create a directory.

Creating a new folder in a GitHub Repo
💡
Note: You can't create an empty folder, you need to create a file in it, you can't just the folder on GitHub.

Thanks for reading!

I hope this article helped you, keep GitHubing 😄