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.
For example, to restore a file from the current base commit:

