cg-restore(1) - Linux man page
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 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 © Petr Baudis, 2005
See Also
cg-restore is part of gitlink:cogito[7], a toolkit for managing gitlink:git[7] trees.