Skip to content

What's the difference between reset and revert? #3

@mfisher87

Description

@mfisher87

It's not immediately intuitive how these commands differ. Explain how both can achieve the same content state ("undo" something) while treating the history differently: reset rewrites history by moving a branch pointer arbitrarily, while revert adds to the history by creating a new commit or commits which "undo" a change from prior commits.

A real world example: https://nsidc.slack.com/archives/C03V0AH6T5M/p1687563623209789

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions