Git

Last Updated: 8/11/2023

Restoring a Deleted File

  • To restore a file, we have to look at the parent of the commit that deleted the file

Delete File

git rm toc.txt
git commit -m "Remove toc.txt"

Restore File

git checkout commitid toc.txt
git commit -m "Resored toc.txt"