Challenge 1
Complete the Git command to record a history-preserving reversal.
git HEAD
Press Ctrl⌘Enter to check your answer
Create a disposable repository with at least three commits whose effects are easy to distinguish. Revert the newest commit, then inspect the resulting history and patch. In a separate disposable repository, revert an earlier commit while preserving a later commit. Finally, construct a controlled conflict during a revert, resolve it, and complete the operation. Record the original target commit ID, the new revert commit ID, `HEAD`, `git show`, `git diff`, and `git status --short` before and after each operation. Success means you can predict that revert adds history rather than moving the branch tip, can identify the commit whose patch is being reversed, and can explain what happens when the inverse patch conflicts. Never substitute `reset --hard` for a history-preserving revert when the original commit must remain in the branch history.
Challenge 1
git HEAD
Press Ctrl⌘Enter to check your answer
Challenge 2
git HEAD~2
Press Ctrl⌘Enter to check your answer
Challenge 3
git
Press Ctrl⌘Enter to check your answer
Challenge 4
git <commit>
Press Ctrl⌘Enter to check your answer