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

Re: git only one file

From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Date
Aug 25, 2009, 21:29 UTC
Message-ID
<1251235768-24921-1-git-send-email-giuseppe.bilotta@gmail.com>
In-Reply-To
<synhedionn@gmail.com>
synhedionn <synhedionn@gmail.com> wrote:
> with git add .  , a directory is expected, but I don't need all my files to
> be recorded, only one of my thousands, so how can I record just 1 file?

Generally, if you want to track a single file in a directory you just add that file, as per Matthias' suggestion, and possibly create a .gitignore with the single '*' pattern in it..

<shameless plug> However, if you want to track more than one _independent_ files in the same directory (RCS-style), then I would recommend you look into zit, the Git-based single-file content tracker I've developed. You can find it at git://git.oblomov.eu/zit ( gitweb at http://git.oblomov.eu/zit ) </shameless plug>

Next: Giuseppe Bilotta
Message 1 of 2 in “Re: git only one file”
  1. Giuseppe BilottaAug 25, 2009
  2. Giuseppe BilottaAug 26, 2009

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.