---
name: "cg-reset"
section: "1"
platform: "linux"
package: "cogito"
version: "0.18.2-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/cg-reset"
---

# cg-reset(1)

reset the state of the working tree

## NAME

cg-reset - reset the state of the working tree

## SYNOPSIS

cg-reset \[--adds-removes\].sp

## DESCRIPTION

Reverts the working tree to a consistent state before any changes to it (including merges etc.) were done. This command will rebuild the state of the tree according to the commit of .git/refs/heads/master, so if your working tree got into basically any inconsistent state, this will cure it..sp Basically, this is the opposite of [**cg-commit**(1)](/cg-commit/1.md) in some sense..sp This command is complementary to [**cg-restore**(1)](/cg-restore/1.md), which only brings individual files in sync with their state at the time of the last commit..sp

## OPTIONS

- \--adds-removes

  Reset ONLY the so-called "index" file. This effectively means that any adds and removes you did will be unrecorded (but if you removed the file physically as well, that will not be undone - run *cg-restore* to restore it physically afterwards).

- \-h, --help

  Print usage summary.

- \--long-help

  Print user manual. The same as found in [**cg-reset**(1)](/cg-reset/1.md).

## COPYRIGHT

Copyright © Petr Baudis, 2005.sp

## SEE ALSO

cg-reset is part of [**cogito**(7)](/cogito/7.md), a toolkit for managing [**git**(7)](/git/7.md) trees..sp
