Skip to main content
The restore command restores a file or directory from a previous commit, branch, or tag into your current workspace.
<path> is the file or directory path to restore. [--source <ref>] specifies the source to restore from: a commit ID, branch name, or tag ID. Defaults to the workspace’s base commit. [--nowait] returns immediately without waiting for the restored files to finish syncing to your local workspace. By default, the command waits until the sync is done. For example, to restore a file from the current base commit:
To restore from a specific branch: