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

Re: Are "private blobs/trees" possible?

From
SRSeth Robertson <in-git@baka.org>
Date
Oct 25, 2010, 20:43 UTC
Message-ID
<201010252043.o9PKhN6I024622@no.baka.org>
In-Reply-To
<1288037406.819.93.camel@drew-northup.unet.maine.edu>

In message <1288037406.819.93.camel@drew-northup.unet.maine.edu>, Drew Northup writes:

    On Mon, 2010-10-25 at 15:19 -0400, Kynn Jones wrote:
    > There are some files that I want to keep under local git
    > control, but never push to any remote repositories.
    > What's the best way to implement this idea with git?
    > The best solution I can think of is to put these files in some
    > git-controlled directory that is not below the "main" working
    > directory, and have an (ignored) symlink to it in this working
    > directory.
    > Is there a better way?
    There is no restriction that you only have one git repository on any
    given machine.... Set up your symlink to those files in their own git
    repository.

Depending on your proposed workflow (e.g. do you want to perform many git operations such as commit, push, pull, tag, branch, etc) on the public and private repositories at the same time even if they go different places, a multi-repository management system like gitslave (http://gitslave.sf.net) might work for you. If you do not plan to branch/tag your private repository along with the public repository or do not have an "upstream" for your private repository, the symlink approach is probably the best.

In either case, remember .git/info/exclude and git-config's core.excludesfile for a way to privately ignore the symlink or gitslave files.

					-Seth Robertson
Previous: Drew NorthupNext: Kynn Jones
Message 3 of 4 in “Are "private blobs/trees" possible?”
  1. Kynn JonesOct 25, 2010
  2. Drew NorthupOct 25, 2010
  3. Seth RobertsonOct 25, 2010
  4. Kynn JonesOct 26, 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.