From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: git: how to restore a deleted worktree? Date: Thu, 4 Jan 2018 09:06:35 -0500 Message-ID: References: <86wp0x3f7c.fsf@stephe-leake.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1515074778 11147 195.159.176.226 (4 Jan 2018 14:06:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2018 14:06:18 +0000 (UTC) Cc: emacs-devel To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 04 15:06:14 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eX69o-0001wp-4R for ged-emacs-devel@m.gmane.org; Thu, 04 Jan 2018 15:06:08 +0100 Original-Received: from localhost ([::1]:36273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX6Bi-0004eP-1h for ged-emacs-devel@m.gmane.org; Thu, 04 Jan 2018 09:08:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eX6Ae-0004Vl-21 for emacs-devel@gnu.org; Thu, 04 Jan 2018 09:07:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eX6AH-0007Fc-52 for emacs-devel@gnu.org; Thu, 04 Jan 2018 09:06:59 -0500 Original-Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:35195) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eX6AG-0007DL-SI for emacs-devel@gnu.org; Thu, 04 Jan 2018 09:06:36 -0500 Original-Received: by mail-wr0-x230.google.com with SMTP id l19so1585086wrc.2 for ; Thu, 04 Jan 2018 06:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=LHJH2K8MfnwXc/nRgerokI9N1ciXpmuz885FmWfxsn0=; b=ZSESTUWBMwNj//zBs13iCyu4hCX2VgN8doc4NlmArmBhU3bvoXgs7qnavAlBx6zxjV GcUhrKvFhKsD3zHRMljsSJ3w5vplqJ+SYu3pw9JdaO9b3c4OFPF7G8HXLouIIVL2Zlu1 eAL9z+QE2U6QucT/hyN+anmkkx2CaKb70zP0hF3v6pK0+ifnIljlD/KJtrAg+xCgCm+h vcI3tQppLNVNwrnrZDCaSMFA324wQKpSEu6zgD9ycMe6ZCsHoHSD3Z7ivV1JXfjLXRBz bpoEZZpoGB1TxAPN0c5AZayD2IaYuFP1xzPCDxg1eTeGs/FdAF02NGptK+c1MNFYShpG nCEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=LHJH2K8MfnwXc/nRgerokI9N1ciXpmuz885FmWfxsn0=; b=aRtgA9HdwBMkvH3/To4xHsp/Nk7uH3RVih3ffFZeG6ZtVR45PGls+U7H7fxWZSuUi2 W5S2Dve9xIyOuowH9kcLcvMGojFRmWdM+dPXj3LtTNvsO06g5p/eCfmE7ML48fQNU+57 uwDnag1Oo5HW7QIij9uJScvlXVwIPzxmoLyVaguQi5aSRfQVpPPcNK8Aeer1R1uNfv+Y SKPBYySZxE07Y9wh9tEkHoNW3krkuATv5rXBSl8p+GCdVhnNKcpIuwcV6Hucutr4tGuu RGXJmnFfrAL6p+GkktZSg4cJTpoASXkcv6BwZP3OGzgbmRFxGiyKNEC2NQif5fQEyMll xTHQ== X-Gm-Message-State: AKGB3mLtRNgeewPlauXpT+bB4ALsTB2cXeJPMEVU0PVZhd8An+GryYwp fx9QpeTfRhAlQQc046m4CtfThRmpa+7MFKOPAIPu5Q== X-Google-Smtp-Source: ACJfBosGZk4D1BPIrTfDOKr3WTCyStlZEN90F6HZto8pgmMcLEYrfZew3ekbSRhM948+e1llOXKC1a56Hdmhr7+gj0Q= X-Received: by 10.223.176.81 with SMTP id g17mr1673090wra.267.1515074795805; Thu, 04 Jan 2018 06:06:35 -0800 (PST) Original-Received: by 10.223.145.129 with HTTP; Thu, 4 Jan 2018 06:06:35 -0800 (PST) In-Reply-To: <86wp0x3f7c.fsf@stephe-leake.org> X-Google-Sender-Auth: WD-Zzj6ehvy__gx0HnLJ_XGDTw0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221591 Archived-At: On Thu, Jan 4, 2018 at 8:51 AM, Stephen Leake wrote: > 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". You need 'git worktree prune' to make git remove the bookkeeping info about that deleted worktree (possibly you have delete your new tree first, not sure how pruning works when you've recreated a new worktree in the same place). git help worktree: When you are done with a linked working tree you can simply delete it. The working tree=E2=80=99s administrative files in the repository (= see "DETAILS" below) will eventually be removed automatically (see gc.worktreePruneExpire in git-config[1]), or you can run git worktree prune in the main or any linked working tree to clean up any stale administrative files.