git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Feature idea: Ignore content
@ 2010-01-19 13:29 Ramkumar Ramachandra
  2010-01-19 14:05 ` Peter Krefting
  2010-01-19 16:57 ` Jacob Helwig
  0 siblings, 2 replies; 5+ messages in thread
From: Ramkumar Ramachandra @ 2010-01-19 13:29 UTC (permalink / raw)
  To: git

Hi,

Often, I find that I need to track a file which contains a small
portion I don't want to track (read: line with a password). Instead of
moving that out to a separate file and ignoring that file, is it a
good idea to add a feature to Git to allow ignoring content instead of
whole files? Since Git by nature tracks content, this shouldn't be too
hard to implement, right?

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

* Re: Feature idea: Ignore content
  2010-01-19 13:29 Feature idea: Ignore content Ramkumar Ramachandra
@ 2010-01-19 14:05 ` Peter Krefting
  2010-01-19 19:14   ` Dirk Süsserott
  2010-01-19 16:57 ` Jacob Helwig
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Krefting @ 2010-01-19 14:05 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: Git Mailing List

Ramkumar Ramachandra:

> Instead of moving that out to a separate file and ignoring that file, is 
> it a good idea to add a feature to Git to allow ignoring content instead 
> of whole files?

You should be able to do that by setting up a filter. Please see 
gitattributes(5) for more information (search for "filter").

-- 
\\// Peter - http://www.softwolves.pp.se/

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

* Re: Feature idea: Ignore content
  2010-01-19 13:29 Feature idea: Ignore content Ramkumar Ramachandra
  2010-01-19 14:05 ` Peter Krefting
@ 2010-01-19 16:57 ` Jacob Helwig
  1 sibling, 0 replies; 5+ messages in thread
From: Jacob Helwig @ 2010-01-19 16:57 UTC (permalink / raw)
  To: Ramkumar Ramachandra; +Cc: git

On Tue, Jan 19, 2010 at 05:29, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
> Hi,
>
> Often, I find that I need to track a file which contains a small
> portion I don't want to track (read: line with a password). Instead of
> moving that out to a separate file and ignoring that file, is it a
> good idea to add a feature to Git to allow ignoring content instead of
> whole files? Since Git by nature tracks content, this shouldn't be too
> hard to implement, right?
>

Generally, the way I've seen this handled is by tracking an example
file, and ignoring the "real" file with the password.

Something like:
  config/database.example.yml <-- Tracked file, with a dummy password
& connection info.
  config/database.yml    <-- Ignored file, actually used by application.

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

* Re: Feature idea: Ignore content
  2010-01-19 14:05 ` Peter Krefting
@ 2010-01-19 19:14   ` Dirk Süsserott
  2010-01-19 19:24     ` Ramkumar Ramachandra
  0 siblings, 1 reply; 5+ messages in thread
From: Dirk Süsserott @ 2010-01-19 19:14 UTC (permalink / raw)
  To: Peter Krefting; +Cc: Ramkumar Ramachandra, Git Mailing List

Am 19.01.2010 15:05 schrieb Peter Krefting:
> Ramkumar Ramachandra:
> 
>> Instead of moving that out to a separate file and ignoring that file, 
>> is it a good idea to add a feature to Git to allow ignoring content 
>> instead of whole files?
> 
> You should be able to do that by setting up a filter. Please see 
> gitattributes(5) for more information (search for "filter").
> 

Hi Ramkumar,

please have a look at this thread:
http://marc.info/?t=125882165900001&r=1&w=2
especially Björn's suggestion to use a 'clean filter'. It worked fine
for me with a similar problem: I wanted Git to ignore a certain pattern
in my files.

HTH,
Dirk

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

* Re: Feature idea: Ignore content
  2010-01-19 19:14   ` Dirk Süsserott
@ 2010-01-19 19:24     ` Ramkumar Ramachandra
  0 siblings, 0 replies; 5+ messages in thread
From: Ramkumar Ramachandra @ 2010-01-19 19:24 UTC (permalink / raw)
  To: Dirk Süsserott; +Cc: Peter Krefting, Git Mailing List

> http://marc.info/?t=125882165900001&r=1&w=2

Fantastic- I had no idea that such a feature even existed. I got it to
work nicely. Thanks!

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

end of thread, other threads:[~2010-01-19 19:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 13:29 Feature idea: Ignore content Ramkumar Ramachandra
2010-01-19 14:05 ` Peter Krefting
2010-01-19 19:14   ` Dirk Süsserott
2010-01-19 19:24     ` Ramkumar Ramachandra
2010-01-19 16:57 ` Jacob Helwig

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).