Nishaglobal Education logo

READMEs, releases and good Git habits

Make your GitHub projects look professional with a README written in Markdown, mark versions with tags, publish with GitHub Pages, and adopt the everyday Git habits teams expect.

Lesson 11 of 1135 minQuiz: 4 questions

🎯 By the end of this lesson you will be able to:

  • Write a README.md in Markdown
  • Mark a version with an annotated tag and push it
  • Follow everyday Git habits that keep projects clean and safe
Outline
  1. What you'll learn and why it matters
  2. A README in Markdown
  3. Tags: naming a version
  4. Publish a website with GitHub Pages
  5. Everyday habits
  6. Practice
  7. Common mistakes
  8. Recap
  9. Quiz
  10. Mark lesson complete

What you'll learn and why it matters

Recruiters and teammates judge a project in seconds from its GitHub page. A clear README, tidy history and marked releases say *this person works professionally*. This lesson covers those finishing touches and the habits that prevent most Git problems.

A README in Markdown

GitHub shows a file called README.md below the file list on the repository's front page. The .md means Markdown: plain text with a few symbols for formatting.

You typeYou get
# TitleA big heading (## for a smaller one)
- itemA bullet point
**bold** and *italic*bold and *italic*
` code `Inline code
[text](https://example.com)A link
![alt text](images/screenshot.png)An image, with alt text
README.md
# My Website

The personal portfolio of Asha Kumar, a junior web developer in Pune.

## Features

- Responsive layout for phones and laptops
- Accessible navigation and contact form

## How to run it

Open `index.html` in any web browser. No installation needed.

## Built with

HTML and CSS, from the free HTML & CSS for Beginners course.

A good README answers: what is this, what does it do, how do I run it, and what is it built with. A screenshot helps a lot for websites.

Terminal
printf '%s\n' "# My Website" "" "The personal portfolio of Asha Kumar." > README.md
git add README.md
git commit -m "Add README"
git push -q
git status

Output

[main f35c604] Add README
 1 file changed, 3 insertions(+)
 create mode 100644 README.md
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

Tags: naming a version

A tag is a permanent name for one commit, usually a version number such as v1.0. Annotated tags (-a) also store a message, the date and who made them:

Terminal
git tag -a v1.0 -m "First public version of the portfolio"
git tag
git log --oneline -1
git push origin v1.0

Output

v1.0
1ce7ed1 (HEAD -> main, tag: v1.0, origin/main) Add intro sentence
To https://github.com/asha-kumar/my-website.git
 * [new tag]         v1.0 -> v1.0

Tags are not pushed with normal git push; push each one by name as above. On GitHub, tags appear under Releases → Tags, and you can turn one into a Release with notes and downloadable files.

Publish a website with GitHub Pages

If your repository holds a website (like your portfolio), GitHub Pages can host it for free:

  1. On the repository page, open Settings → Pages.
  2. Under Build and deployment, set Source to Deploy from a branch.
  3. Choose the main branch and the / (root) folder, then Save.
  4. After a minute or two, the page shows your site's address, such as https://asha-kumar.github.io/my-website/.

From then on, every push to main updates the live site automatically. That is your first taste of continuous deployment, which the DevOps course explores.

Everyday habits

HabitWhy
git pull before you startStart from the latest version; avoid conflicts
One branch per feature or fixKeeps main working and pull requests focused
Small commits with clear messagesEasy to review, understand and undo
git status and git diff --staged before committingCatch mistakes and stray files
Push at the end of each sessionYour work is backed up
Never commit secrets; use .gitignoreLeaked keys can cost money and data
Never force-push shared branchesAvoid deleting teammates' work

Practice

Guided exercise

Add a README and push

Create a README.md with a title and one-sentence description, commit it with the message Add README, push, and show the last commit.

  1. Create the file in VS Code (or with printf as in the example).
  2. git add README.md and git commit -m "Add README".
  3. git push, then git log --oneline -1.
Show the solution
Solution
printf '%s\n' "# My Website" "" "The personal portfolio of Asha Kumar." > README.md
git add README.md
git commit -q -m "Add README"
git push -q
git log --oneline -1

Output

f35c604 (HEAD -> main, origin/main) Add README

How to get there: After the push, origin/main and main point to the same commit, which is why both labels appear on it. On GitHub, the README now shows below the file list.

Your turn

Tag a release

Tag the current commit as v1.1 with the message Add contact details, list the tags, and push the new tag.

Show the solution
Solution
git tag -a v1.1 -m "Add contact details"
git tag
git push origin v1.1

Output

v1.0
v1.1
To https://github.com/asha-kumar/my-website.git
 * [new tag]         v1.1 -> v1.1

How to get there: git tag lists all tags in order. Each new tag must be pushed by name (or all at once with git push --tags).

Common mistakes

Naming the file readme.txt

You see: GitHub shows it as plain text without formatting

Fix: Name it README.md.

Expecting git push to send tags

You see: The tag is missing on GitHub

Fix: Push it by name: git push origin v1.0.

Making a repository public without checking it

You see: Private information is exposed

Fix: Review files and history first; keep secrets out with .gitignore.

Choosing the wrong Pages folder

You see: A 404 page on your GitHub Pages address

Fix: Use the folder that contains index.html (usually / (root)).

Recap

  • README.md, written in Markdown, is your project's front page on GitHub.
  • git tag -a v1.0 -m "…" marks a version; push tags by name.
  • GitHub Pages publishes a website from your main branch for free.
  • Pull first, branch per change, small clear commits, push often, never commit secrets or force-push shared branches.

Key terms

README
A file that introduces a project: what it is and how to use it.
Markdown
A simple text format using symbols like # and - for headings and lists.
Tag
A permanent name for a particular commit, usually a version number.
GitHub Pages
A free GitHub service that publishes a website from a repository.

Check your understanding

Answer all 4 questions, then check your answers to see an explanation for each one.

  1. 1. Which Markdown makes a top-level heading?

  2. 2. Why is your v2.0 tag not on GitHub after git push?

  3. 3. With semantic versioning, what does a change from v1.4.2 to v1.4.3 usually mean?

  4. 4. Which habit most reduces merge conflicts?

Answer all 4 questions to check.

Mark this lesson complete

Finished this lesson?

When you have worked through the examples and exercises, mark it complete to save your progress.