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.
🎯 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
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 type | You get |
|---|---|
# Title | A big heading (## for a smaller one) |
- item | A bullet point |
**bold** and *italic* | bold and *italic* |
` code ` | Inline code |
[text](https://example.com) | A link |
 | An image, with alt text |
# 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.
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 statusOutput
[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:
git tag -a v1.0 -m "First public version of the portfolio"
git tag
git log --oneline -1
git push origin v1.0Output
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:
- On the repository page, open Settings → Pages.
- Under Build and deployment, set Source to Deploy from a branch.
- Choose the main branch and the / (root) folder, then Save.
- 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
| Habit | Why |
|---|---|
git pull before you start | Start from the latest version; avoid conflicts |
| One branch per feature or fix | Keeps main working and pull requests focused |
| Small commits with clear messages | Easy to review, understand and undo |
git status and git diff --staged before committing | Catch mistakes and stray files |
| Push at the end of each session | Your work is backed up |
| Never commit secrets; use .gitignore | Leaked keys can cost money and data |
| Never force-push shared branches | Avoid 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.
- Create the file in VS Code (or with
printfas in the example). git add README.mdandgit commit -m "Add README".git push, thengit log --oneline -1.
Show the 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 -1Output
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
git tag -a v1.1 -m "Add contact details"
git tag
git push origin v1.1Output
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. Which Markdown makes a top-level heading?
2. Why is your v2.0 tag not on GitHub after git push?
3. With semantic versioning, what does a change from v1.4.2 to v1.4.3 usually mean?
4. Which habit most reduces merge conflicts?
Mark this lesson complete
Finished this lesson?
When you have worked through the examples and exercises, mark it complete to save your progress.