← TechnologyThe essentials of

Git revert: reversing a change while retaining history

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 16:11 · Updated: 22 Oct 2026 16:11

AI source check: 22 Oct 2026 14:04. This is not editorial approval.

In a few sentences

In brief

git revert creates a new commit reversing an earlier change. The old commit remains in history rather than being erased.

Useful to know

git revert creates a new commit reversing an earlier change. The old commit remains in history rather than being erased. [1]

This differs from moving a branch backwards with reset. Later dependent changes can require conflict resolution and testing. Reverting code is itself a new change and needs an understandable resulting behaviour.

Sources

For further detail and to check the information:

  1. [1] Git - git-revert Documentation ↗