re: Git Staging Area: Explained Like I'm Five VIEW POST

TOP OF THREAD FULL DISCUSSION
re: How do I open one of the many sealed boxes find some old code and bring it back to life? Let's say, I deleted a bunch of files in favour of one t...
 
 

Ok, I get that this opens the box. Now my HEAD is in the box, but how do I recover the one file?

Well, depends on what you mean by recover. If you checked out the commit, you'll see the version of the file you want. If there's a lot of changes you can make a copy and then paste it over the latest commit. If there's a few, you can revert lines or hunks selectively.

code of conduct - report abuse