resetSoft abstract method

Future<void> resetSoft(
  1. String target
)

Moves HEAD to target without touching the index or the work tree (git reset --soft).

target is a revision expression of the grammar documented on GitRevisionResolver, so a branch name and an object name both work. It works in a bare repository too, where it moves the branch HEAD points at. The commits left behind stay reachable through the refs that still name them, and their changes stay staged in a work tree. An expression that reads like an option — it starts with - — names no revision and is refused before any command runs.

Raises GitUnknownRevisionException when target names no revision.

Implementation

Future<void> resetSoft(String target);