Challenge 1
Complete the Git command to move refs or reset local state.
git
Press Ctrl⌘Enter to check your answer
Create a disposable repository with at least two commits. First make a new edit and stage it, then use the path form of `git reset` to unstage it without losing the working-tree edit. Next create a second commit, record its object ID, and experiment in separate disposable copies with `--soft`, `--mixed`, and `--hard` resets to its parent. For each mode, record the resulting `HEAD`, index, working-tree content, `ORIG_HEAD`, and `git status --short`. Explain exactly which states changed and which did not. Success means you can predict the state transition before running each command and then verify the prediction with `git rev-parse`, `git diff`, `git diff --cached`, file contents, and `git status --short`. Never use `--hard` on work you need to keep.
Challenge 1
git
Press Ctrl⌘Enter to check your answer
Challenge 2
git HEAD -- file.txt
Press Ctrl⌘Enter to check your answer
Challenge 3
git --soft HEAD~1
Press Ctrl⌘Enter to check your answer
Challenge 4
git --mixed HEAD~1
Press Ctrl⌘Enter to check your answer