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

Re: Feature idea: Ignore content

From
Jacob Helwig <jacob.helwig@gmail.com>
Date
Jan 19, 2010, 16:57 UTC
Message-ID
<8c9a061001190857i12a8deeex74809ffd302bc54d@mail.gmail.com>
In-Reply-To
<f3271551001190529h389ce321k52dcca6b03e4e8f0@mail.gmail.com>
On Tue, Jan 19, 2010 at 05:29, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 9 quoted lines
> 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.
Previous: Ramkumar Ramachandra
Message 5 of 5 in “Feature idea: Ignore content”
  1. Ramkumar RamachandraJan 19, 2010
  2. Peter KreftingJan 19, 2010
  3. Dirk SüsserottJan 19, 2010
  4. Ramkumar RamachandraJan 19, 2010
  5. Jacob HelwigJan 19, 2010

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.