git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Question on git-filter-branch

From
Alex Riesen <raa.lkml@gmail.com>
Date
Nov 1, 2007, 14:20 UTC
Message-ID
<20071101142051.GB14475@steel.home>
In-Reply-To
<20071101133440.GA17239@glandium.org>
Mike Hommey, Thu, Nov 01, 2007 14:34:41 +0100:
Show 14 quoted lines
> On Thu, Nov 01, 2007 at 07:19:05AM -0600, Bill Lear wrote:
> > >Just remove .git/refs/original/
> > 
> > Ok, thanks.  But, how do I remove the subdirectory?
> > 
> > % rm -rf .git/refs/original
> > % git filter-branch --index-filter 'git update-index --remove sensitive_stuff' HEAD
> > Rewrite 6711f6a50605918326f67ca0c3402eab9a4c8571 (8/8)
> > WARNING: Ref 'refs/heads/master' is unchanged
> 
> git-update-index --remove will remove files, not trees, so you need to
> use something like
> git-ls-files ensitive_stuff | xargs -d "\n" git-update-index --remove
> instead.
git ls-files -z sensitive_stuff | git update-index --remove -z --stdin
Previous: Bill Lear
Message 6 of 6 in “Question on git-filter-branch”
  1. Bill LearNov 1, 2007
  2. Mike HommeyNov 1, 2007
  3. Bill LearNov 1, 2007
  4. Mike HommeyNov 1, 2007
  5. Bill LearNov 1, 2007
  6. Alex RiesenNov 1, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.