Skip to lesson

Making your GitHub profile match your resume

Before the interview, an interviewer may open your GitHub link from the resume. A clear profile helps, while a committed password or a pile of empty repositories can end the conversation.

Profile README template

A profile README is a README.md in a repository named exactly like your GitHub username. GitHub shows it at the top of your profile as a short introduction.

A visitor reads your profile README first. Keep it short and factual: who you are, your main projects and how to reach you.

Text
# Hi, I'm AnanyaFinal-year CSE student building backend services in **Java** and **Spring Boot**.**Projects**- [ShopLite API](https://github.com/ananya-rao/shoplite-api): Spring Boot REST API with JWT, MySQL, tests, Docker- [Hostel Complaint Tracker](https://github.com/ananya-rao/hostel-complaints): Java + JDBC console app for hostel complaints**Tech:** Java, Spring Boot, Spring Data JPA, MySQL, JUnit 5, Git, Docker**Contact:** ananya.rao.dev@gmail.com | linkedin.com/in/ananya-rao

Example 1 · Creating the profile README repository

Terminal
# 1. On GitHub: New repository, name it exactly your username (e.g. ananya-rao),#    make it Public and tick "Add a README file".# 2. Then edit it locally:git clone https://github.com/ananya-rao/ananya-rao.gitcd ananya-rao# edit README.md with the template abovegit add README.mdgit commit -m "Add profile introduction and project links"git push
Result
Your profile page now shows README.md above the pinned repositories.

What this code does

  • The repository name must match your username exactly; that is how GitHub knows to show it on your profile.
  • The commit message says what changed, which is the habit the commit-history section asks for.

Write it in Markdown, a simple text format where # makes a heading and - makes a list. Long lists of badges, animated banners and visitor counters add noise; one clear paragraph and a project list work better.

Pinning the projects listed on your resume

A pinned repository is one of up to six repositories you choose to show at the top of your GitHub profile, above the activity graph.

This program scores repositories to decide which four to pin: resume projects first, then repositories with a README and real commits.

Example 2 · Choosing what to pin

PinChoiceDemo.javaJava
import java.util.Comparator;import java.util.List;
public class PinChoiceDemo {    record Repo(String name, boolean onResume, boolean hasReadme, int commits, boolean practiceOnly) {}
    static int score(Repo r) {        return (r.onResume() ? 100 : 0) + (r.hasReadme() ? 20 : 0) + Math.min(r.commits(), 50) - (r.practiceOnly() ? 30 : 0);    }
    public static void main(String[] args) {        List<Repo> repos = List.of(                new Repo("shoplite-api", true, true, 64, false),                new Repo("hostel-complaints", true, true, 23, false),                new Repo("dsa-practice", false, true, 140, true),                new Repo("test123", false, false, 2, false),                new Repo("spring-tutorial-copy", false, false, 5, true),                new Repo("hackathon-attendance-app", false, true, 31, false));
        repos.stream()                .sorted(Comparator.comparingInt(PinChoiceDemo::score).reversed())                .limit(4)                .forEach(r -> System.out.println("pin: " + r.name() + " (score " + score(r) + ")"));    }}
Output
pin: shoplite-api (score 170)
pin: hostel-complaints (score 143)
pin: hackathon-attendance-app (score 51)
pin: dsa-practice (score 40)

What this code does

  • Resume projects score highest, so they always come first. A README and some real commit history add points; practice-only repositories lose points.
  • The weights are a simple way to think, not a rule. The point: your pinned list should be your resume list plus your next best real work.

Pin the same projects your resume lists, in the same order, so a reviewer who clicks your GitHub link sees them first. Give every pinned repository a clear name (shoplite-api, not project1 or test-final), a one-line description and topic tags such as java, spring-boot, mysql. Pin practice repositories (DSA solutions, course exercises) only if you have space after real projects.

Predict the output

Predict the pins

Read each snippet and pick what it prints.

Round 1 of 2

record Repo(String name, boolean onResume, boolean hasReadme) {}
Repo r = new Repo("shoplite-api", true, true);
int score = (r.onResume() ? 100 : 0) + (r.hasReadme() ? 20 : 0);
System.out.println(r.name() + " " + score);

A good project README

A project README is the front page of a repository: what the project does, its tech, how to run it, how to use it, how to test it and what you would improve.

A reviewer should understand a project in one minute. This README answers their questions in the order they ask them.

Example 3 · Project README template

Text
# ShopLite APISpring Boot REST API for a small online shop: products, categories, customers and orders.## Features- 20+ REST endpoints with validation, paging and ProblemDetail errors- JWT login with customer and admin roles- MySQL schema managed by Flyway; 45 JUnit 5 and Mockito tests## Tech stackJava 17, Spring Boot, Spring Data JPA, Spring Security, MySQL 8.4, Flyway, Docker## Run locallyPrerequisites: JDK 17+, Docker1. Copy .env.example to .env and set DB_PASSWORD and JWT_SECRET2. docker compose up --build3. Open http://localhost:8080/swagger-ui.html## Example requestcurl http://localhost:8080/api/v1/products?page=0&size=5## Tests./mvnw test## What I would improveCaching for product reads; Testcontainers integration tests
Review summary
A reviewer learns in under a minute: what it does, the stack, how to run it with
one command, how to try it, how to test it and what you would do next.
Secrets appear only as names (DB_PASSWORD, JWT_SECRET), never as values.

What this code does

  • Each heading answers one question a reviewer has, in the order they ask it. Screenshots or a short GIF of the Swagger page or a sample response make it even clearer.
  • Follow your own Run locally steps on a fresh clone before you share the link; broken setup steps are the most common README problem.

Setup steps must actually work on a fresh machine: list the Java version, the database, environment variables and the exact commands. Test them by cloning your own repository into a new folder and following your README word for word. Screenshots or a short GIF of the Swagger page make it even clearer. Revise: Ship ShopLite: live URL and README (opens in a new tab).

Parts of a good README:

  • Title and one-line summary; then Features (3-6 bullets).
  • Tech stack; Setup (prerequisites, configuration, run command); Usage (sample requests, screenshots).
  • Tests (how to run); Project structure (optional); What I learned or would improve.
  • Never put real passwords in the README; show placeholders like DB_PASSWORD=your_password.

Order of execution

Order the README

Put the parts of a project README in the order a reviewer needs them.

Clean commit history and no committed secrets

A secret is a password, API key or token. Never commit one: anyone can read it in the Git history, and bots scan public repositories for keys.

The scanner flags lines that look like real passwords or keys and skips placeholders. First, find the problems yourself.

Example 4 · Scanning a project for committed secrets

SecretScanDemo.javaJava
import java.io.IOException;import java.nio.file.Files;import java.nio.file.Path;import java.util.List;import java.util.regex.Pattern;import java.util.stream.Stream;
public class SecretScanDemo {    static final List<Pattern> RULES = List.of(            Pattern.compile("(?i)password\\s*[=:]\\s*(?!\\$\\{)(?!your_)\\S+"),            Pattern.compile("AKIA[0-9A-Z]{16}"),            Pattern.compile("(?i)(api[_-]?key|secret)\\s*[=:]\\s*(?!\\$\\{)(?!your_)\\S{8,}"));
    public static void main(String[] args) throws IOException {        Path dir = Files.createTempDirectory("repo");        Files.writeString(dir.resolve("application.properties"),                "spring.datasource.password=Shop@2026\njwt.secret=k8Hq2LmP9xTz4WvB\n");        Files.writeString(dir.resolve("application.properties.example"),                "spring.datasource.password=${DB_PASSWORD}\njwt.secret=your_secret_here\n");        Files.writeString(dir.resolve("README.md"), "Set DB_PASSWORD in .env before running.\n");
        try (Stream<Path> files = Files.list(dir).sorted()) {            for (Path f : (Iterable<Path>) files::iterator) {                List<String> lines = Files.readAllLines(f);                for (int i = 0; i < lines.size(); i++) {                    String line = lines.get(i);                    if (RULES.stream().anyMatch(p -> p.matcher(line).find())) {                        System.out.println("POSSIBLE SECRET " + f.getFileName() + ":" + (i + 1));                    }                }            }        }        System.out.println("Fix: move values to environment variables, add the real file to .gitignore, rotate exposed keys.");
        try (Stream<Path> files = Files.list(dir)) {            for (Path f : (Iterable<Path>) files::iterator) Files.delete(f);        }        Files.delete(dir);    }}
Output
POSSIBLE SECRET application.properties:1
POSSIBLE SECRET application.properties:2
Fix: move values to environment variables, add the real file to .gitignore, rotate exposed keys.

What this code does

  • The scanner flags the real application.properties (lines 1 and 2) but not the example file, whose values are ${DB_PASSWORD} placeholders or start with your_. It prints file names only and deletes its temporary folder.
  • Real tools such as GitHub secret scanning and gitleaks know hundreds of key formats; this small version shows the idea. A key found in history must be rotated, not just deleted.

Example 5 · Keeping secrets out with .gitignore

Terminal
# .gitignore (excerpt)target/.idea/*.iml.envsrc/main/resources/application-local.properties# If the real file was already tracked, stop tracking it (keeps your local copy):git rm --cached src/main/resources/application-local.propertiesgit commit -m "Stop tracking local config with credentials"git push# Then change the database password and revoke any exposed keys.
Result
New commits no longer include the local config file.
Old commits still contain the secret, so it must be rotated (changed) anyway.

What this code does

  • .gitignore only affects files that are not tracked yet; git rm --cached stops tracking a file without deleting it from your disk.
  • History rewriting tools exist, but rotating the secret is the step that actually protects you, and it must come first.

A commit history shows how the project grew. Small commits with clear messages ("Add order total calculation with tests") show good habits; one giant "final" commit or 40 commits named "update" do not. Keep secrets in environment variables or an uncommitted config file listed in .gitignore, and commit only an example file. If a secret was committed, rotate it (change the password or revoke the key) first, then clean the code; deleting the line in a new commit does not remove it from history. Revise: .gitignore and secrets (opens in a new tab) and Secrets in code and Git (opens in a new tab).

Keeping secrets out:

  • .gitignore should cover build output (target/), IDE files (.idea/), .env and local config files.
  • Commit application.properties.example with placeholders, not the real file with passwords.
  • GitHub can block some secret patterns on push (push protection) and alert you; do not rely on it alone.

Find the bug

Find the problem

Each block comes from a repository. Click the line that is a problem.

This file is tracked by Git. Which line must not be committed?

Round 1 of 3

Archiving half-finished repositories

To archive a repository is to mark it read-only and label it "archived", so viewers know it is no longer active. It keeps old work visible without suggesting it is current.

This program decides what to do with each old repository: keep it public, add a README, archive it, make it private or delete it.

Example 6 · Deciding what to do with each old repository

RepoCleanupDemo.javaJava
import java.util.List;
public class RepoCleanupDemo {    record Repo(String name, boolean hasReadme, boolean finished, boolean worthShowing, int commits) {}
    static String decide(Repo r) {        if (r.commits() <= 2 && !r.worthShowing()) return "delete (empty test)";        if (r.finished() && r.hasReadme()) return "keep public";        if (r.worthShowing()) return r.finished() ? "add README, keep public" : "archive (record of past work)";        return "make private";    }
    public static void main(String[] args) {        List<Repo> repos = List.of(                new Repo("shoplite-api", true, true, true, 64),                new Repo("first-website-2023", false, true, true, 18),                new Repo("college-ml-assignment", false, false, true, 9),                new Repo("spring-tutorial-copy", false, false, false, 5),                new Repo("test123", false, false, false, 1));        for (Repo r : repos) System.out.printf("%-22s -> %s%n", r.name(), decide(r));    }}
Output
shoplite-api           -> keep public
first-website-2023     -> add README, keep public
college-ml-assignment  -> archive (record of past work)
spring-tutorial-copy   -> make private
test123                -> delete (empty test)

What this code does

  • Finished work with a README stays public; finished work without one gets a README. Unfinished but meaningful work is archived so it reads as past work, not abandoned work.
  • Tutorial copies become private, and empty tests are deleted. The goal is a profile where every public repository is something you can discuss.

Many students have dozens of half-finished tutorial repositories with no README; they make a profile look unfocused. For each old repository, choose: finish it and add a README, archive it if it has some value as a record, make it private if it is unfinished and not worth showing, or delete it if it is an empty test. Keep the public profile to work you are happy to discuss.

Predict the output

Predict the decision

Read the rules once, then pick what each repository gets.

Round 1 of 2

record Repo(String name, boolean finished, boolean hasReadme, boolean worthShowing, int commits) {}
Repo r = new Repo("first-website-2023", true, false, true, 18);
String action;
if (r.commits() <= 2 && !r.worthShowing()) action = "delete";
else if (r.finished() && r.hasReadme()) action = "keep public";
else if (r.worthShowing()) action = r.finished() ? "add README" : "archive";
else action = "make private";
System.out.println(action);

Next step

Check your understanding

12 quick questions