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

Re: undo delete of remote-tracking branch

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 19, 2010, 15:59 UTC
Message-ID
<20100119155911.GC23466@spearce.org>
In-Reply-To
<87bpgqnlws.wl%leoboiko@ime.usp.br>
Leonardo Boiko <leoboiko@ime.usp.br> wrote:
Show 5 quoted lines
> I'm a complete idiot and just typed this:
> 
>     git branch -d -r origin/master
> 
> Is there a way to undo my act of idiocy?
git fetch origin

Which will create it again during the fetch cycle. Unfortunately the reflog for origin/master is gone, so you won't get results for origin/master@{4.days.ago}.

-- 
Shawn.
Previous: Leonardo BoikoNext: Leonardo Boiko
Message 2 of 3 in “undo delete of remote-tracking branch”
  1. Leonardo BoikoJan 19, 2010
  2. Shawn O. PearceJan 19, 2010
  3. Leonardo BoikoJan 19, 2010

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.