Challenge
beginnerUndo Last Commit
Scenario
Your last commit, Add API config, accidentally included secrets.env, which holds a real API key. Luckily you have not pushed yet, so the commit can still disappear from history.
Mission
Rewrite the last commit so that config.js is committed but secrets.env never was, ignore secrets.env from now on, and keep history to two commits.
Objectives
0/4secrets.envis no longer tracked. (Current objective)config.jsis committed. (Not started)- The working tree is clean, with
secrets.envignored. (Not started) - History still has exactly two commits, so the key is in none of them. (Not started)
Your task nowStep 1 of 4
secrets.env is no longer tracked.
Need help?
Preparing your workspace…
Repository Graph
Click a commit to inspect it
0 commits
Working Tree
Not a Git repository yet
No unstaged changes
Your working tree matches the staging area.
Staging Area
Files prepared for the next commit
No staged changes
Use git add to prepare files for your next commit.
Repository
Committed history
No commits yet
Use git commit to record staged changes.
