Written on August 10th, 2010
Restore files and dirs from previous commits in Git
When I met git, I fall in love in the moment. You can read any apointments I wrote previously here, and here (in spanish) but today I’ll explain how to restore files and directories from previous commits that it was deleted by a mistake or intentionally in the past.
It’s quite easy to revert or reset a single file from history, but what about pulling an entire directory out of the history?
The solution is simple:
git checkout ID_of_commit -- /path/to/dir
This will restore the directory from the given “commit with ID” in the /path/to/dir. Read the rest of this entry »

One of the reasons cause I love the GNU/Linux for developing is its easy and quick setup.