← TechnologyThe essentials of

Git reset: the mode determines what changes

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 reset has different forms affecting HEAD, the index and working files. --soft preserves the index and working contents, while stronger modes have different effects.

Useful to know

git reset has different forms affecting HEAD, the index and working files. --soft preserves the index and working contents, while stronger modes have different effects. [1]

Advice to “run reset” is therefore incomplete. Identify the target revision and which uncommitted contents must survive. Distinguish reorganizing local staging from reversing a shared change with a new commit.

Sources

For further detail and to check the information:

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