From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: Deleted folder keeps showing up? Date: Fri, 4 Sep 2009 04:27:09 -0400 Message-ID: <20090904082708.GA17157@coredump.intra.peff.net> References: <34230C98-81B8-4DC8-846F-8B6FA2A022DA@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: git@vger.kernel.org To: Benjamin Buch X-From: git-owner@vger.kernel.org Fri Sep 04 10:28:47 2009 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1MjU8h-000359-7C for gcvg-git-2@lo.gmane.org; Fri, 04 Sep 2009 10:27:23 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933023AbZIDI1N (ORCPT ); Fri, 4 Sep 2009 04:27:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932675AbZIDI1M (ORCPT ); Fri, 4 Sep 2009 04:27:12 -0400 Received: from peff.net ([208.65.91.99]:46833 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932279AbZIDI1L (ORCPT ); Fri, 4 Sep 2009 04:27:11 -0400 Received: (qmail 18528 invoked by uid 107); 4 Sep 2009 08:27:26 -0000 Received: from coredump.intra.peff.net (HELO coredump.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.40) with (AES128-SHA encrypted) SMTP; Fri, 04 Sep 2009 04:27:26 -0400 Received: by coredump.intra.peff.net (sSMTP sendmail emulation); Fri, 04 Sep 2009 04:27:09 -0400 Content-Disposition: inline In-Reply-To: <34230C98-81B8-4DC8-846F-8B6FA2A022DA@gmx.de> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Sep 03, 2009 at 06:59:18PM +0200, Benjamin Buch wrote: > I made a branch and deleted a folder there with git rm -rf foldername. > So now i have to branches, A with the folder and B without the folder. > > I'm on B, the folder is not there. > Then I check out A, the folder shows up like it should. > When I check out B again, the folder is still there. Is there anything in the folder, like untracked files generated by your build process? Remember that git tracks full paths, not directories. So you never actually "deleted a folder" but rather deleted all of the paths inside that folder. When you switch to branch A, git creates the folder, because it contains tracked files. When you switch back to branch B, git will remove the tracked files, and will remove the directory _only_ if it is then empty. Anything else would mean deleting your untracked files, which may be precious. You mentioned in a later email that you were having trouble reproducing the issue. Try: $ git checkout A $ make ;# or whatever your build process is, or ;# normal work or whatever $ git checkout B and see if that reproduces it. -Peff