unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* git: how to restore a deleted worktree?
@ 2018-01-04 13:51 Stephen Leake
  2018-01-04 14:06 ` Noam Postavsky
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Stephen Leake @ 2018-01-04 13:51 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-07 20:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 13:51 git: how to restore a deleted worktree? Stephen Leake
2018-01-04 14:06 ` Noam Postavsky
2018-01-04 22:04   ` Stephen Leake
2018-01-04 23:14     ` Andreas Schwab
2018-01-04 14:07 ` Nathan Moreau
2018-01-04 22:07   ` Stephen Leake
2018-01-07 20:15     ` Nathan Moreau
2018-01-07 20:22       ` Andreas Schwab
2018-01-04 14:49 ` Andreas Schwab
2018-01-04 18:29 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).