Your Code is Good, But Your Repo Looks Abandoned: A Guide to GitHub Hygiene
Turn a GitHub repository from a code dump into something people trust: write a README that answers what, why and how, add a demo, fill in the About box and topics, set up issue forms and a CONTRIBUTING file, keep secrets and junk out of history, write Conventional Commits and pick a license. Every GitHub feature here was checked against GitHub Docs on 2026-10-29.

Good code in a messy repository still looks risky. A visitor who finds a one-line README, an "Initial commit" history and no license can't tell if the project works or if anyone maintains it. This guide is for developers who want their public repos to work as a portfolio: for hiring managers, clients and other developers deciding whether to use the code. You get a step-by-step cleanup and the checklist I run before making a repo public.
This is part 8 of the Indie Builder Notes series. The previous part covers building applications faster with Supabase; this one is about how you present what you built.
Key takeaways
- The README must answer three questions fast: what this does, why it exists and how to run it. Add a demo right under the intro.
- Use GitHub's own features: the About box and topics, issue forms, a CONTRIBUTING file and a license.
- Keep junk and secrets out of history. If a secret leaks, revoke it first, then clean the history.
What repo hygiene means
Repo hygiene is the set of files, settings and habits that make a repository easy to understand, run and trust. GitHub tracks part of this for public repos as a community profile. It checks for files such as a README, LICENSE, CONTRIBUTING and CODE_OF_CONDUCT in a supported location.
None of this changes what your code does. It changes how fast a stranger can tell what it does.
1. Write the README first
GitHub Docs say a README should tell people why the project is useful, what they can do with it and how to use it. It should also say where to get help and who maintains it. GitHub looks for the README in .github, the repo root and docs, in that order. It truncates anything past 500 KiB, so long docs belong in a wiki or the docs folder.
Start with a clear title, a one-line summary and a few badges. Shields.io serves static badges from a URL, so you don't need an image editor.
# docs-sync-agent


> Scrapes product docs and keeps a vector index up to date.
## Features
- Renders JavaScript pages with Playwright before scraping
- Splits text into chunks and writes embeddings to your vector store
- Backs off and retries when a site rate-limits requests
## Quick start
```bash
pip install -r requirements.txt
python -m docs_sync --source https://docs.python.org/3/
```
Only add a badge if it states something true, such as the license or a passing build. A badge that says "active" on a repo with no commits for a year does more harm than none.
In the features list, say what the tool does for the user. Leave the architecture for a later section.
2. Show it working
A screenshot or short recording proves the project runs. Put it right after the intro so people see it before the install steps.
For screen recordings I use Screen Studio, a Mac app that zooms in on your clicks automatically and can export MP4 or GIF. For a CLI, a short terminal recording that shows the command and its output does the same job.
You don't need to squeeze everything into a GIF. GitHub accepts GIF images and MP4, MOV and WebM videos in Markdown, and recommends MP4 for browser support. Images and GIFs can be up to 10 MB. Videos can be up to 10 MB on free plans and 100 MB on paid plans.
3. Fill in the About box and topics
The About box on the right of the repo page is the first summary most visitors read. Click the gear icon next to "About" to edit the description, website and topics.
Write the description as one plain sentence that names the tool, the stack and the job:
- Weak: "My python bot."
- Better: "Discord bot in Python that uses the OpenAI API to flag spam in community channels."
Topics are labels GitHub uses so people can browse and search repos by subject. The rules from GitHub Docs: up to 20 topics per repo, lowercase letters, numbers and hyphens only, and 50 characters or fewer each. Mix three kinds:
- Language:
python,typescript - Framework:
langchain,nextjs - Domain:
automation,llm,agent
4. Add issue forms and a CONTRIBUTING file
Even a solo project benefits from structured bug reports. Issue templates live in .github/ISSUE_TEMPLATE. GitHub supports two kinds.
| Option | What it is | Trade-off | When to use |
|---|---|---|---|
| Markdown template | A .md file that pre-fills the issue body |
Easy to write, but people can delete the prompts | Small repos, quick setup |
| Issue form | A .yml file with fields and required inputs |
More setup; GitHub marks the feature as public preview | When you need the same details in every report |
config.yml |
Settings for the template chooser | No content of its own | Turn off blank issues or link to a support page |
An issue form must start with name, description and body. This one asks for steps to reproduce and makes them required:
# .github/ISSUE_TEMPLATE/01-bug.yml
name: Bug report
description: Report something that does not work
labels: ["bug"]
body:
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: What did you run, and what happened?
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
# .github/ISSUE_TEMPLATE/config.yml
blank_issues_enabled: false
Labels in the form are only applied if they already exist in the repo. GitHub sorts templates by file name, so a number prefix such as 01- controls the order.
Next, add a CONTRIBUTING.md in the root, docs or .github. GitHub shows a link to it when someone opens an issue or pull request. Three lines are enough to start: fork the repo, create a feature branch, open a pull request with a short description.
5. Keep junk and secrets out of the repo
Commit a .gitignore in the repo root. GitHub keeps ready-made templates per language in the github/gitignore repository. Ignoring a file doesn't untrack it, so remove files you already committed:
echo "node_modules/" >> .gitignore
echo ".env" >> .gitignore
git rm -r --cached node_modules
git add .gitignore
git commit -m "chore: stop tracking node_modules"
If .env was ever committed, also run git rm --cached .env and follow the secret steps below.
If you committed a secret
GitHub Docs say to revoke or rotate the secret first. Once it no longer works, rewriting history may not even be needed. If you do rewrite, GitHub recommends git-filter-repo. You can't clean other people's clones or forks, so rotation is the step that protects you.
GitHub also turns on push protection for users by default. It blocks pushes that contain secrets it recognizes to public repositories. Treat it as a safety net, not a reason to skip .gitignore.
For layout, group files by purpose: source in src or app, tests in tests, docs in docs, helper scripts in scripts. Use your language's usual layout if it has one.
6. Write readable commit messages
Messages such as "fix", "wip" and "update" tell the reader nothing. Conventional Commits is a spec for commit messages in the form type(scope): description. The spec defines feat (a new feature) and fix (a bug fix). Other types such as docs and chore are common conventions. Because the format is structured, tools can build changelogs and pick version numbers from it.
feat(scraper): add Playwright rendering for JavaScript pages
fix(scraper): stop retrying after a 404
docs: add quick start to README
chore: upgrade node dependencies
Instead of "fix stuff", a reader of your history now sees what changed and why.
7. Add a license
Without a license, other people can't legally reuse your code. GitHub Docs put it plainly: without a license, default copyright law applies and you keep all rights. GitHub's Terms of Service still let other GitHub users view and fork a public repo, but that doesn't let them reuse the code elsewhere. If you want people to use the project, add a LICENSE file. Choose a License, a site curated by GitHub, compares the common options, such as MIT and Apache 2.0.
The checklist I run before making a repo public
Before I make any repository public, I run through this checklist:
- Title and description: does the About box say what the tool does?
- README: badges, install steps and tech stack listed.
- Visuals: is there a GIF or screenshot?
- Clean root:
.gitignorein place, no junk files. - Topics: 5 to 7 relevant topics (my rule of thumb; GitHub allows up to 20).
- License: MIT or Apache 2.0 included.
A tidy repo is also easier to answer questions about. The next part of the series, turning community questions into a feedback loop, picks up from there.
Frequently asked questions
Where should the README go if I have a docs folder?
GitHub checks .github, then the root, then docs, and shows the first README it finds. Most projects keep it in the root, where people expect it. Use the other folders only if you have a reason.
Can I put a video in a GitHub README?
Yes. GitHub accepts MP4, MOV and WebM uploads as well as GIFs, and recommends MP4. Free-plan repos have a 10 MB limit for videos, and paid plans allow up to 100 MB.
Should I use issue forms or Markdown templates?
Use a Markdown template if you just want to prompt people. Use an issue form if you need required fields, such as steps to reproduce. GitHub labels issue forms as public preview, so the syntax may still change.
I pushed an API key and deleted the file. Am I safe?
No. The key is still in the commit history and may already be in clones or forks. Revoke or rotate the key first, as GitHub Docs advise. Then decide whether to rewrite history with git-filter-repo.
Does a public repo without a license count as open source?
No. Without a license, default copyright applies. Other GitHub users can view and fork the repo under GitHub's Terms, but they have no right to reuse the code elsewhere. Add a LICENSE file to grant those rights.
Sources
Verified against the sources below on October 29, 2026. Products and docs change often: check the linked sources if something looks different.
- GitHub Docs: About READMEs
- GitHub Docs: Attaching files
- GitHub Docs: Classifying your repository with topics
- GitHub Docs: Configuring issue templates for your repository
- GitHub Docs: Syntax for issue forms
- GitHub Docs: Setting guidelines for repository contributors
- GitHub Docs: About community profiles for public repositories
- GitHub Docs: Ignoring files
- GitHub Docs: Removing sensitive data from a repository
- GitHub Docs: About push protection
- GitHub Docs: Licensing a repository
- Choose a License (by GitHub)
- Conventional Commits 1.0.0
- Shields.io
- Screen Studio
All 12 parts in this series
- Part 01Systematic Ideation: How to Engineer Profitable Micro-SaaS Ideas
- Part 0210 Micro-SaaS Ideas Using AI Automation
- Part 03The De-Scoping Algorithm: How to Define an MVP That Actually Ships
- Part 04Pricing 101 for Solo Founders: Stop Undervaluing Your Code
- Part 05The Developer’s Guide to Landing Page Teardowns: Debugging Your Conversion Rate
- Part 06The Pragmatic Automation Stack: When to Pay vs. When to Self-Host
- Part 07How I Build Applications Faster with Supabase
- Part 08Your Code is Good, But Your Repo Looks Abandoned: A Guide to GitHub Hygiene
- Part 09The Feedback Loop: Turning Community Questions into Engineering Assets
- Part 10The Infinite Content Engine: How to Turn 1 Technical Blog Post into 10 Assets
- Part 11Systematizing Creativity: Building an Automated Content Repurposing Pipeline
- Part 12Refactoring My Reality: The Engineer's Guide to Daily Systems
AI Automation Engineer & Salesforce Developer
Salesforce developer since June 2018. I build AI agents, n8n workflows and Salesforce integrations, and write up what holds up in real use.



Comments
Loading comments...