Gitflow
⛏️When Was This Line Added?Medium+500 XP
Workshop
Scenario reference

When Was This Line Added?: the situation, step by step

The situation

A mysterious feature flag `EXPERIMENTAL_FOO` appears in the codebase. No one remembers adding it. Find when and why.

`git log -S '<string>'` (pickaxe) finds commits that add/remove that exact text.

Medium · 2 steps · +500 XP

What you will practice

This scenario walks through 2 steps, in order:

  1. 01Search for the flag's introduction
  2. 02Show the suspect commit
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Search for the flag's introduction
    git log -S "EXPERIMENTAL_FOO" --oneline
  2. 2. Show the suspect commit
    git show pk00002

Key takeaway

-S for literal strings, -G for regex. Pickaxe is forensic Git.