git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* remove all traces of some files
@ 2011-04-27 19:58 Eric Frederich
  2011-04-27 20:37 ` Johannes Sixt
  2011-04-27 20:40 ` Phil Hord
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Frederich @ 2011-04-27 19:58 UTC (permalink / raw)
  To: git

I have been adding build files (.dll and .so files) to my git
repository periodically when I have been doing builds of my project.
I know I shouldn't be doing this and want to set up some other kind of
separate archive or something for built files.

Although there are other devs on the project, I am the only one using
Git.  Everyone else uses AccuRev.
Personally, I maintain my own Git repo (with an AccuRev git branch).

I would like to remove all traces of those .dll and .so files if I
could in my git repository.
I realize this would mess with hashes and would ultimately result in a
completely new tree.
I am fine with that since, as I said, I am the only user of this Git repo.

So, can this be done?  Can I rebuild the tree preserving commit
messages, timestamps, etc but ignoring certain files?

Thanks,
~Eric

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

* Re: remove all traces of some files
  2011-04-27 19:58 remove all traces of some files Eric Frederich
@ 2011-04-27 20:37 ` Johannes Sixt
  2011-04-27 20:40 ` Phil Hord
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Sixt @ 2011-04-27 20:37 UTC (permalink / raw)
  To: Eric Frederich; +Cc: git

Am 27.04.2011 21:58, schrieb Eric Frederich:
> I have been adding build files (.dll and .so files) to my git
> repository periodically when I have been doing builds of my project.
> I know I shouldn't be doing this and want to set up some other kind of
> separate archive or something for built files.
> 
> Although there are other devs on the project, I am the only one using
> Git.  Everyone else uses AccuRev.
> Personally, I maintain my own Git repo (with an AccuRev git branch).
> 
> I would like to remove all traces of those .dll and .so files if I
> could in my git repository.
> I realize this would mess with hashes and would ultimately result in a
> completely new tree.
> I am fine with that since, as I said, I am the only user of this Git repo.
> 
> So, can this be done?  Can I rebuild the tree preserving commit
> messages, timestamps, etc but ignoring certain files?

Get familiar with git-filter-branch --index-filter.

-- Hannes

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

* Re: remove all traces of some files
  2011-04-27 19:58 remove all traces of some files Eric Frederich
  2011-04-27 20:37 ` Johannes Sixt
@ 2011-04-27 20:40 ` Phil Hord
  1 sibling, 0 replies; 3+ messages in thread
From: Phil Hord @ 2011-04-27 20:40 UTC (permalink / raw)
  To: Eric Frederich; +Cc: git

On 04/27/2011 03:58 PM, Eric Frederich wrote:
> I have been adding build files (.dll and .so files) to my git
> repository periodically when I have been doing builds of my project.
> I know I shouldn't be doing this and want to set up some other kind of
> separate archive or something for built files.
>
> Although there are other devs on the project, I am the only one using
> Git.  Everyone else uses AccuRev.
> Personally, I maintain my own Git repo (with an AccuRev git branch).
>
> I would like to remove all traces of those .dll and .so files if I
> could in my git repository.
> I realize this would mess with hashes and would ultimately result in a
> completely new tree.
> I am fine with that since, as I said, I am the only user of this Git repo.
>
> So, can this be done?  Can I rebuild the tree preserving commit
> messages, timestamps, etc but ignoring certain files?

Something like this, perhaps:
  git filter-branch --index-filter "git rm --cached --ignore-unmatch
--quiet '*.dll' '*.so' " -- --all

More examples here:
  git filter-branch --help

Phil

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

end of thread, other threads:[~2011-04-27 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 19:58 remove all traces of some files Eric Frederich
2011-04-27 20:37 ` Johannes Sixt
2011-04-27 20:40 ` Phil Hord

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 NNTP newsgroup(s).