Git — Medium
Key points
- Git revert preserves commit history by creating a new commit.
- Git reset alters the branch pointer, potentially losing commits.
- The two commands serve distinct purposes in managing commit history.
- Git revert is generally used for public commits, while git reset is used for local changes.
Ready to go further?
Related questions
