EJERCICIO_PRÁCTICO
Time Travel: History
Time Travel: Reading History
1. View History (Log)
bashgit log git log --oneline
2. View Differences (Diff)
If you modified a file but haven't staged it yet, you can see changes:
bashgit diff
3. Undo Changes
If you messed up an uncommitted file:
bashgit restore filename.txt
Practical Exercise
- Modify your
index.html. - Run
git diff. - Run
git restore index.htmland see the changes disappear. - Make a new change, commit it, and check
git log --oneline.
