Skip to contentSkip to conversation

undo delete of remote-tracking branch

DISCUSSION Leonardo Boiko 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

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?

--
Leonardo Boiko

#1 lore raw
Quoted 5 lines · Leonardo Boiko

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}.

Signature · 1 line
Shawn.
#2 lore raw
Quoted 1 line · Shawn O. Pearce

git fetch origin

Thanks much, that solved the problem. Will try to educate myself better on remote-tracking branches.