man cg-restore (Commandes) - restore files in the working tree to state at the given/last commit

NAME

cg-restore - restore files in the working tree to state at the given/last commit

SYNOPSIS

cg-restore [-f] [-r ID] [FILE]...

DESCRIPTION

Restore given files to their original state. It recovers any files (or files passed as arguments to the command, respectively) removed locally whose removal was not recorded by cg-rm(1).

If passed the -f parameter, it restores the files to their state as of the last commit (including bringing files removed with cg-rm(1) back to life).

If passed the -r parameter, it will not restore the file as of the last commit, but to the state in the given commit, tree, or blob. The list of files is mandatory in this case.

For the "restore-to-last-commit" usage, this command is complementary to the cg-reset(1) command, which forcefully abandons all the changes in the working tree and restores everything to a proper state (including unseeking, cancelling merge in progress and rebuilding indexes).

OPTIONS

-f
Restore even locally modified files to the version as of the last commit. Take care!
-r COMMIT_ID, -r TREE_ID, -r BLOB_ID
Restore the file to the state appropriate to the given ID. The list of files to recover is mandatory in this case.
-h, --help
Print usage help.

COPYRIGHT

Copyright © Petr Baudis, 2005

SEE ALSO

cg-restore command is part of cogito(7), a toolkit for managing git(7) trees.