Git restore

description:

git restore recovery file tree
using something to restore the source-reduction path specified work tree. If you trace the path but there is no reduction in the source, the path will be deleted in order to match the source.
This command can also be used to restore the contents of the index --staged, or return to work tree and an index --staged --worktree.
By default, the Restore HEAD working tree and index are indexed. --sourceMay be used to submit designated as the restore source.

Commonly used commands:

  • Restore all files in the current directory
    git restore .
  • Restore files
    git restore <file>
Published 33 original articles · won praise 62 · views 240 000 +

Guess you like

Origin blog.csdn.net/Jairoguo/article/details/104321962