From: Junio C Hamano Date: Sat, 14 Jul 2007 18:50:49 GMT Subject: Re: Restoring files from old commits Message-ID: <7vbqeeizue.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20070714143233.GC2544@steel.home> Alex Riesen writes: > martin f krafft, Sat, Jul 14, 2007 14:37:54 +0200: >> also sprach Nikodemus Siivola [2007.07.14.1409 +0200]: >> > What is the recommended way to restore individual files >> > (or directories) in the working tree to the content they >> > had in a given commit? >> >> As per my comment on IRC, I think >> >> git checkout >> >> is the way. > > It does not work for directories, though. Are you sure about that? I just did this in my git.git workspace: $ mv Documentation Documentation- $ git checkout HEAD Documentation/ $ diff -r Documentation- Documentation