Friday, August 18, 2023

To git restore all the unstaged files

 Sometimes, you may purposely delete some of the files for testing, then you will need to restore these files, it will take a lot of key strokes if you do file by file, the below command can restore all the unstaged files in git


git restore -- $(git ls-files -m)

No comments:

Post a Comment