git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-checkout: allow pathspec to recover lost working tree directory

From
Junio C Hamano <junkio@cox.net>
Date
Nov 16, 2006, 02:00 UTC
Message-ID
<7vlkmcgngc.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<ejge6q$bm7$1@sea.gmane.org>
"Anand Kumria" <wildfire@progsoc.org> writes:
Show 15 quoted lines
> On Wed, 15 Nov 2006 11:07:19 -0800, Junio C Hamano wrote:
>
>> It is often wanted on the #git channel that this were to work to
>> recover removed directory:
>> 
>> 	rm -fr Documentation
>> 	git checkout -- Documentation
>> 	git checkout HEAD -- Documentation ;# alternatively
>> 
>> Now it does.
>
> One thing I often seem to do is make some changes, test them out and
> remove the file if it wa a dead end and get my original back with
> 'cg-restore <file>'. Does this mean that the git equivalent will be 'git
> checkout -- <file>' as well?

Naming individual files has been supported for a long time. What this patch adds is an ability to name a whole directory to restore to the index state or a named commit state).

Previous: Anand KumriaNext: Petr Baudis
Message 3 of 4 in “git-checkout: allow pathspec to recover lost working tree directory”
  1. git-checkout: allow pathspec to recover lost working tree directoryJunio C Hamano, Nov 15, 2006
  2. Anand KumriaNov 16, 2006
  3. Junio C HamanoNov 16, 2006
  4. Petr BaudisNov 17, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.