# Are "private blobs/trees" possible?

4 messages from 2010-10-25 to 2010-10-26. Participants: Kynn Jones, Drew Northup, Seth Robertson.
Thread: https://gitlist.dev/t/25547

## Kynn Jones, 2010-10-25 19:19

Subject: Are "private blobs/trees" possible?
Message-ID: <AANLkTimQ7Z9Cd2yKw5jFD6UBzFRBZk_-SpC7jc6+JACw@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimQ7Z9Cd2yKw5jFD6UBzFRBZk_-SpC7jc6%2BJACw%40mail.gmail.com

```
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?

TIA!

~kj

```

## Drew Northup, 2010-10-25 20:10

Subject: Re: Are "private blobs/trees" possible?
Message-ID: <1288037406.819.93.camel@drew-northup.unet.maine.edu>
URL: https://gitlist.dev/e/1288037406.819.93.camel%40drew-northup.unet.maine.edu
In-Reply-To: <AANLkTimQ7Z9Cd2yKw5jFD6UBzFRBZk_-SpC7jc6+JACw@mail.gmail.com>

```

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?
> 
> TIA!

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.

-- 
-Drew Northup N1XIM
   AKA RvnPhnx on OPN
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

```

## Seth Robertson, 2010-10-25 20:43

Subject: Re: Are "private blobs/trees" possible?
Message-ID: <201010252043.o9PKhN6I024622@no.baka.org>
URL: https://gitlist.dev/e/201010252043.o9PKhN6I024622%40no.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

```

## Kynn Jones, 2010-10-26 16:56

Subject: Re: Are "private blobs/trees" possible?
Message-ID: <AANLkTinVcHK_qwqcPCecHuWXGsVdGhmy+6+eLOW1bLWQ@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinVcHK_qwqcPCecHuWXGsVdGhmy%2B6%2BeLOW1bLWQ%40mail.gmail.com
In-Reply-To: <201010252043.o9PKhN6I024622@no.baka.org>

```
Actually, it occurred to me after posting that the symlinking is not
necessary.  As long as the private directory is ignored, then it can
have its own independent (and purely local) git repository.

But I'll look into the multi-repo management system that Seth mentioned.

Thanks!


```
