<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: git: forever remove files or folders from history</title>
	<atom:link href="http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/feed/" rel="self" type="application/rss+xml" />
	<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/</link>
	<description>dound&#039;s space on the web</description>
	<lastBuildDate>Sat, 06 Mar 2010 16:39:53 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tom Harada</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-5283</link>
		<dc:creator>Tom Harada</dc:creator>
		<pubDate>Sat, 23 Jan 2010 09:28:42 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-5283</guid>
		<description>&lt;a href=&quot;#comment-5050&quot; rel=&quot;nofollow&quot;&gt;@Phil Lawrence&lt;/a&gt; 

As sort of a follow up in case it helps anyone else. I recently started using git again, and basically needed to remove a bunch of binary files that I&#039;d added via &#039;git add . / git commit&#039;

The key for me (having read the &#039;git magic&#039; tutorial also) is to remember that you can remove files from off the head of the repository but still keep them in your working directory (via &#039;git rm --cached ... / git commit&#039;).

Once they&#039;re gone from the repository, you can then invoke &#039;git-remove-history ...&#039; with the files (which still exist) and they will be cleanly removed from your .git repo...

At any rate, thanks a lot for this script! Pushes me over the threshold to adopting git again....</description>
		<content:encoded><![CDATA[<p><a href="#comment-5050" rel="nofollow">@Phil Lawrence</a> </p>
<p>As sort of a follow up in case it helps anyone else. I recently started using git again, and basically needed to remove a bunch of binary files that I&#8217;d added via &#8216;git add . / git commit&#8217;</p>
<p>The key for me (having read the &#8216;git magic&#8217; tutorial also) is to remember that you can remove files from off the head of the repository but still keep them in your working directory (via &#8216;git rm &#8211;cached &#8230; / git commit&#8217;).</p>
<p>Once they&#8217;re gone from the repository, you can then invoke &#8216;git-remove-history &#8230;&#8217; with the files (which still exist) and they will be cleanly removed from your .git repo&#8230;</p>
<p>At any rate, thanks a lot for this script! Pushes me over the threshold to adopting git again&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Dodwell</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-5091</link>
		<dc:creator>Mark Dodwell</dc:creator>
		<pubDate>Tue, 05 Jan 2010 02:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-5091</guid>
		<description>Awesome, thanks!</description>
		<content:encoded><![CDATA[<p>Awesome, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Underhill</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-5054</link>
		<dc:creator>David Underhill</dc:creator>
		<pubDate>Sun, 03 Jan 2010 17:32:52 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-5054</guid>
		<description>&lt;a href=&quot;#comment-4519&quot; rel=&quot;nofollow&quot;&gt;@Ernest&lt;/a&gt; 
Yes, it removes the files from all of your repository&#039;s history -- including the head of the repository.</description>
		<content:encoded><![CDATA[<p><a href="#comment-4519" rel="nofollow">@Ernest</a><br />
Yes, it removes the files from all of your repository&#8217;s history &#8212; including the head of the repository.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil Lawrence</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-5050</link>
		<dc:creator>Phil Lawrence</dc:creator>
		<pubDate>Sun, 03 Jan 2010 08:39:38 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-5050</guid>
		<description>Add some escaped quotes to deal with paths and filenames with spaces in them:

  git filter-branch --index-filter &quot;git rm -rf --cached --ignore-unmatch \&quot;${files}\&quot;&quot; HEAD</description>
		<content:encoded><![CDATA[<p>Add some escaped quotes to deal with paths and filenames with spaces in them:</p>
<p>  git filter-branch &#8211;index-filter &#8220;git rm -rf &#8211;cached &#8211;ignore-unmatch \&#8221;${files}\&#8221;" HEAD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ernest</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-4519</link>
		<dc:creator>Ernest</dc:creator>
		<pubDate>Fri, 30 Oct 2009 18:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-4519</guid>
		<description>I tried this script under msysgit (Windows).

It runs and removes files from history, BUT ALSO THE ORIGINAL FILES from my working directory!

Is this intended behavior?

Or maybe a problem with msysgit?</description>
		<content:encoded><![CDATA[<p>I tried this script under msysgit (Windows).</p>
<p>It runs and removes files from history, BUT ALSO THE ORIGINAL FILES from my working directory!</p>
<p>Is this intended behavior?</p>
<p>Or maybe a problem with msysgit?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl van Tonder</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-4191</link>
		<dc:creator>Carl van Tonder</dc:creator>
		<pubDate>Tue, 06 Oct 2009 16:35:18 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-4191</guid>
		<description>&lt;a href=&quot;#comment-2804&quot; rel=&quot;nofollow&quot;&gt;@jovo&lt;/a&gt; 
You need to run it with the actual name of the file — if you save it as &#039;git-delete-history.sh&#039; then you need to run it, as David says, with
&lt;pre lang=&quot;bash&quot;&gt;
./git-delete-history.sh test1
&lt;/pre&gt;
Note the addition of &#039;.sh&#039;.

David: Thanks so much for this script. I committed a 255MB file and almost immediately realised what a bad move that was, but it&#039;s now fixed. Yay!</description>
		<content:encoded><![CDATA[<p><a href="#comment-2804" rel="nofollow">@jovo</a><br />
You need to run it with the actual name of the file — if you save it as &#8216;git-delete-history.sh&#8217; then you need to run it, as David says, with</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>git-delete-history.sh test1</pre></div></div>

<p>Note the addition of &#8216;.sh&#8217;.</p>
<p>David: Thanks so much for this script. I committed a 255MB file and almost immediately realised what a bad move that was, but it&#8217;s now fixed. Yay!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jovo</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-2804</link>
		<dc:creator>jovo</dc:creator>
		<pubDate>Sat, 25 Jul 2009 15:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-2804</guid>
		<description>no dice :( 

any other ideas?

maybe i could save this file in some folder that&#039;s already in my path (i don&#039;t know which folders are in my path)?

thanks again</description>
		<content:encoded><![CDATA[<p>no dice <img src='http://dound.com/wp/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  </p>
<p>any other ideas?</p>
<p>maybe i could save this file in some folder that&#8217;s already in my path (i don&#8217;t know which folders are in my path)?</p>
<p>thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Underhill</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-2787</link>
		<dc:creator>David Underhill</dc:creator>
		<pubDate>Fri, 24 Jul 2009 20:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-2787</guid>
		<description>&lt;a href=&quot;#comment-2764&quot; rel=&quot;nofollow&quot;&gt;@jovo&lt;/a&gt; 
It looks like you need to specify the path to the script too.  Since it is in the folder you are currently in, try 
&lt;pre lang=&quot;bash&quot;&gt;./git-delete-history test1&lt;/pre&gt; (or alternatively, you could do 
&lt;pre lang=&quot;bash&quot;&gt;bash git-delete-history test1&lt;/pre&gt;).</description>
		<content:encoded><![CDATA[<p><a href="#comment-2764" rel="nofollow">@jovo</a><br />
It looks like you need to specify the path to the script too.  Since it is in the folder you are currently in, try</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>git-delete-history test1</pre></div></div>

<p> (or alternatively, you could do</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span> git-delete-history test1</pre></div></div>

<p>).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jovo</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-2764</link>
		<dc:creator>jovo</dc:creator>
		<pubDate>Thu, 23 Jul 2009 18:55:42 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-2764</guid>
		<description>i need a bit of help.  i get:

$ git-delete-history test1  
zsh: command not found: git-delete-history

i&#039;m running mac osx, git version 1.5.x, the file called git-remove-history.sh is in the current folder.
i also tried typying git-remove-history test1, but that didn&#039;t work either.

many thanks for any tips....</description>
		<content:encoded><![CDATA[<p>i need a bit of help.  i get:</p>
<p>$ git-delete-history test1<br />
zsh: command not found: git-delete-history</p>
<p>i&#8217;m running mac osx, git version 1.5.x, the file called git-remove-history.sh is in the current folder.<br />
i also tried typying git-remove-history test1, but that didn&#8217;t work either.</p>
<p>many thanks for any tips&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Git Script to Show Largest Pack Objects and Trim Your Waist Line! &#171; Stubbisms &#8211; Tony&#8217;s Weblog</title>
		<link>http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/comment-page-1/#comment-2389</link>
		<dc:creator>Git Script to Show Largest Pack Objects and Trim Your Waist Line! &#171; Stubbisms &#8211; Tony&#8217;s Weblog</dc:creator>
		<pubDate>Fri, 10 Jul 2009 01:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://dound.com/?p=132#comment-2389</guid>
		<description>[...] to David Underhill for the inspiration, and the various posts on the git mailing [...]</description>
		<content:encoded><![CDATA[<p>[...] to David Underhill for the inspiration, and the various posts on the git mailing [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
