Add a README file to your GitHub repo 📖
By Sulamita Ivanov

Posted on 2/12/2024

Add a README file to your GitHub repo 📖

A README file is important for any project, seems like a minor detail but it’s a great way to introduce your project to the world and insure that it is being used properly.

There’s three ways to add a README file to your GitHub repo:

  1. If you already have a repo, you can add a README file by clicking on the “Add a README” button on the main page of your repo.

  1. You can also add a README file when you create a new repo.

  1. Lastly, adding it as a file on your local computer then pushing it to your repo on GitHub.

This tutorial will cover the third option.

1. Adding a README file to your project locally

💡 If you want to add a README file to someone else’s project and don’t know where to start; read Clone, edit and push to GitHub then come back to this article after you’ve cloned the repo.

2. Adding content to your README file

Here are some basic things you can include in your README file:

3. Pushing your README file to GitHub

Open your terminal 💡 Use the search on your computer to find it.

Access the location and folder where your project is located. In this example, my project is located on my Desktop and a folder called new-project.

cd Desktop/new-project
💡If it is a folder within a folder, add another forward slash and the next folder name. Repeat until you get to the root folder of your project.

git init

git status Git status is always optional but good practice. Check the status of your files, it will show you which files have been modified, added or deleted.

git add

git status

git commit -m "added README file"

git remote add origin

git push -u origin main

You can now refresh the page and see your README file on GitHub! 🎉