❌ Remember that file you deleted last week? Too bad, now you need it.
Let's see how git restore can help you recover it.
There are a few ways to restore deleted files in git, depending on how far away in the history the file was deleted. I’ll cover the most common scenarios and how can you find lost files with git, with the help of `git log` for those cases where you don't exactly remember when it happened.
You might also want to know how to undo a commit: • Undo a Commit on Git
_______________________________
Hit like and subscribe for more content! :D
Beginner-Friendly Open Source Projects: https://github.com/DevLeonardoCommunity
Join the Discord community! Here's the invite: / discord
You can also follow me on the other platforms:
Twitter: / balastrong
dev.to: https://dev.to/balastrong
Home: https://leonardomontini.dev/
TikTok: / balastrong
GitHub: https://github.com/Balastrong
Instagram: / devbalastrong
_______________________________
TIMESTAMPS
00:00 Simple case
01:07 Restore from main
01:57 Find the deleted file
02:54 Recover from a commit
04:15 Undo a commit
Sound effects from https://www.zapsplat.com
#git