emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

git: how to restore a deleted worktree?


From: Stephen Leake
Subject: git: how to restore a deleted worktree?
Date: Thu, 04 Jan 2018 07:51:03 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (windows-nt)

I have the emacs-26 branch checked out in a worktree created by :

cd emacs/master
git worktree add -b emacs-26 ../emacs-26 origin/emacs-26

At some point, that worktree was in a confusing state, so I deleted it,
intending to do a fresh checkout. So I repeated the above command, but
it complained "branch emacs-26 already exists". So I dropped the '-b
emacs-26', and the command seemed to work.

However, 'git status' in the new worktree says "not on any branch", 
'git push' complains about fast-forward, and 'git pull' says not on a
branch.

How do I fix this?

-- 
-- Stephe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]