Restore deleted (versioned) files in your git repository
Sometimes I accidentally delete files in a cloned git repository. The following command restores the files in a convient way:
git ls-files -d | xargs git checkout --
Written by Michael Frey
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#