cg-restore(1)
=============

NAME
----
cg-restore - restore files in the working tree to the given state

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 gitlink: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
gitlink: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 gitlink: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 summary.

--long-help::
	Print user manual. The same as found in gitlink:cg-restore[1].
--



COPYRIGHT
---------
Copyright (C) Petr Baudis, 2005

SEE ALSO
--------
cg-restore is part of gitlink:cogito[7],
a toolkit for managing gitlink:git[7] trees.
