Skip to lesson

Linking Answers to Your GitHub Code

Every project answer is only as strong as the evidence behind it. Interviewers open your GitHub to check the README, the commit history and whether your link works, and then ask you to find code on screen.

A README that sells the project

A README.md is the file GitHub shows on a repository's front page. It answers four questions in about 30 seconds: what is this, how do I run it, what does it do, and what did you build?

This ShopLite README puts the one-line description first, then features, run steps and tests. The next example generates its API table from one list.

Example 1 · A README template for ShopLite

Text
# ShopLite APIAn online store REST API: products, categories, customers, addresses andorders, with JWT login. Java 17, Spring Boot 4.1.1, Spring Data JPA, MySQL 8.## Features- 33 endpoints under /api/v1, with paged and sorted lists- Placing an order locks product rows, so the last item is never sold twice- JWT login; customers see only their own orders- Errors as ProblemDetail JSON (400, 404, 409, 422)## Run it locally    git clone https://github.com/<your-username>/shoplite-api.git    cd shoplite-api    docker compose upThen open http://localhost:8080/swagger-ui/index.html## Tests    ./mvnw verify    # about 20 unit tests, then about 70 integration tests## What I builtBuilt while following a Java backend course. My own additions:coupon codes (POST /api/v1/orders accepts couponCode) and a low-stock report.
What a reviewer finds in 30 seconds
What it is · how to run it · what it does · what you built

What this code does

  • The first two lines answer "what is this?" before any scrolling.
  • The run steps are three commands, which a reviewer can actually try; the API docs link shows where to look next.
  • "What I built" is honest about the course and points at your own work, which is where good follow-up questions come from.

Example 2 · Generate the API table for your README

ReadmeTableDemo.javaJava
import java.util.List;
record Endpoint(String method, String path, String purpose) {}
public class ReadmeTableDemo {    static String toTable(List<Endpoint> endpoints) {        StringBuilder sb = new StringBuilder();        sb.append("| Method | Path | Purpose |\n");        sb.append("|---|---|---|\n");        for (Endpoint e : endpoints) {            sb.append("| ").append(e.method())                    .append(" | `").append(e.path()).append("` | ")                    .append(e.purpose()).append(" |\n");        }        return sb.toString();    }
    public static void main(String[] args) {        List<Endpoint> endpoints = List.of(                new Endpoint("GET", "/api/v1/products", "List products (paged)"),                new Endpoint("GET", "/api/v1/products/{id}", "One product"),                new Endpoint("POST", "/api/v1/orders", "Place an order"),                new Endpoint("POST", "/api/v1/orders/{id}/cancel", "Cancel a placed order"));        System.out.print(toTable(endpoints));    }}
Output
| Method | Path | Purpose |
|---|---|---|
| GET | `/api/v1/products` | List products (paged) |
| GET | `/api/v1/products/{id}` | One product |
| POST | `/api/v1/orders` | Place an order |
| POST | `/api/v1/orders/{id}/cancel` | Cancel a placed order |

What this code does

  • The output is a Markdown table: GitHub renders it as a neat table on the README page.
  • Generating it from one list keeps the README in step with the API when you add an endpoint.
  • A short table like this lets an interviewer pick an endpoint and ask "show me the code behind this one".

Put the description and stack first, then features as short bullets, then the run steps, an API list and a screenshot or two. Finish with an honest "What I built" note: it answers the course-project question before it is asked.

Test your run steps on a fresh clone in a new folder: steps that fail on the first try hurt more than having no steps. Never include secrets, broken steps or someone else's name or screenshots. Revise: README and Markdown (opens in a new tab).

Find the bug

Review the README

Each README has one line a reviewer should not trust. Click it.

Which run step will fail for a reviewer?

Round 1 of 3

Clean commit history and meaningful messages

A commit history is the list of commits that shows how a project grew. Many small commits with clear messages show that you built it step by step.

A good message says what changed, in the imperative ("add", "fix"), in about 72 characters or fewer. A type prefix such as feat: or fix: makes the history easy to scan.

Terminal
git log --oneline -5# 7c1e2a9 test(orders): add 20-thread oversell test# 4b8d0f1 fix(orders): lock product rows before reducing stock# 91aa3c2 feat(auth): add JWT login and /me/orders# 0d5e7b4 docs: add API list and run steps to README# 3f2c6e8 feat(products): add paged product search
  • One logical change per commit, committed as you go.
  • Subject line: imperative, specific, about 72 characters or fewer, no full stop.
  • Type prefix: feat, fix, refactor, test, docs, chore.
  • Use branches and pull requests for bigger features, even when working alone.

Example 3 · Check commit messages before you push

CommitMessageDemo.javaJava
import java.util.List;import java.util.regex.Pattern;
public class CommitMessageDemo {    static final Pattern TYPED = Pattern.compile("(feat|fix|refactor|test|docs|chore)(\\([a-z-]+\\))?: \\S.*");
    static String check(String message) {        if (message.length() > 72) {            return "too long (" + message.length() + " chars)";        }        if (!TYPED.matcher(message).matches()) {            return "add a type such as feat: or fix:";        }        if (message.endsWith(".")) {            return "drop the full stop";        }        return "ok";    }
    public static void main(String[] args) {        List<String> messages = List.of(                "feat(orders): lock product rows when placing an order",                "fixed stuff",                "fix(auth): return 401 for an expired token.",                "update",                "test(orders): add 20-thread oversell test");        for (String m : messages) {            System.out.printf("%-56s %s%n", m, check(m));        }    }}
Output
feat(orders): lock product rows when placing an order    ok
fixed stuff                                              add a type such as feat: or fix:
fix(auth): return 401 for an expired token.              drop the full stop
update                                                   add a type such as feat: or fix:
test(orders): add 20-thread oversell test                ok

What this code does

  • matches() needs the whole message to fit the pattern: a type, an optional (scope), a colon, a space and some text.
  • The checks mirror common team rules: a short subject line, a type prefix, no full stop at the end.
  • "fixed stuff" and "update" fail for the right reason: they do not say what changed.

Predict the output

Predict the commit check

A team rule checks commit messages with a pattern. What does it say?

Round 1 of 2

Does this message match a typed pattern?

String msg = "feat(auth): add JWT login";
System.out.println(msg.matches("(feat|fix|test|docs)(\\([a-z]+\\))?: \\S.*"));

Pinning projects and keeping the resume link working

A pinned repository is one of up to six projects shown at the top of your GitHub profile, chosen by you.

This program checks resume links: a full https link to the repository root is clickable and shows the README first.

Example 4 · Check the GitHub links on your resume

ResumeLinkDemo.javaJava
import java.util.regex.Pattern;
public class ResumeLinkDemo {    static final Pattern PROFILE = Pattern.compile("https://github\\.com/[A-Za-z0-9-]+/?");    static final Pattern REPOSITORY = Pattern.compile("https://github\\.com/[A-Za-z0-9-]+/[A-Za-z0-9._-]+/?");
    static String check(String url) {        if (!url.startsWith("https://")) {            return "write the full https:// link so it is clickable";        }        if (REPOSITORY.matcher(url).matches()) {            return "repository link";        }        if (PROFILE.matcher(url).matches()) {            return "profile link";        }        return "deep link: point to the repository root";    }
    public static void main(String[] args) {        String[] links = {            "https://github.com/riya-sharma/shoplite-api",            "https://github.com/riya-sharma",            "github.com/riya-sharma/shoplite-api",            "https://github.com/riya-sharma/shoplite-api/tree/main/src"        };        for (String link : links) {            System.out.println(link + " -> " + check(link));        }    }}
Output
https://github.com/riya-sharma/shoplite-api -> repository link
https://github.com/riya-sharma -> profile link
github.com/riya-sharma/shoplite-api -> write the full https:// link so it is clickable
https://github.com/riya-sharma/shoplite-api/tree/main/src -> deep link: point to the repository root

What this code does

  • A link without https:// may not become clickable in a PDF resume, so the reader has to copy it by hand.
  • A deep link into a folder hides the README; the repository root shows it first.
  • A pattern can only check the shape. Whether the page really opens (public, not renamed) needs a real click in a private window.

Pin your two or three best projects and give each a one-line About description; keep everything else unpinned.

  • Public repository with a descriptive name (shoplite-api, not project1).
  • A full https:// link to the repository root on the resume.
  • Every link tested in a private window, where you are not signed in.
  • No renaming or deleting of repositories while applications are open.

A pattern can only check the shape of a link: whether the page really opens needs a real click.

Navigating your repository live during an interview

Live navigation is finding and explaining code on screen while the interviewer watches, usually on a shared screen in an online round.

This map shows where things live in ShopLite. Knowing it by heart lets you open the right class in seconds and narrate while you click.

Example 5 · A map of where things live

Text
shoplite-api/  README.md, docker-compose.yml, pom.xml  src/main/java/com/shoplite/    common/security/SecurityConfig    <- which URLs need a JWT    product/    ProductController, ProductService, ProductRepository    order/      OrderController, OrderService   <- stock lock, transaction    common/     GlobalExceptionHandler           <- errors as ProblemDetail  src/main/resources/    application.properties    db/migration/  V1__create_schema.sql ... V5__create_refresh_token.sql  src/test/java/com/shoplite/    order/      OrderControllerTest, OrderServiceIT, OrderCancellationIT
Goal
Folder → class → method, found and explained in under 10 seconds.

What this code does

  • This is one common layout (grouped by feature); yours may group by layer instead. What matters is that you know it without searching.
  • The arrows mark the places interviewers ask about most: security rules, the main business rule and error handling.
  • Migrations and tests are part of the map too: "show me a test for that rule" is a common follow-up.

Rehearse the three places you are most likely to be asked about: where a request enters, where the main rule lives and where the database is called.

  • Before the call: the project open in your IDE and built, and a browser tab on the repository.
  • Finders: t on GitHub; Shift twice (Search Everywhere) in IntelliJ IDEA.
  • While you click: say where you are going and why.

Revise: What each layer does (opens in a new tab).

Order of execution

Order a live walk-through

The interviewer says: "Show me where stock is reduced." Put your moves in order.

Next step

Check your understanding

12 quick questions