git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daed Lee <daed@thoughtsofcode.com>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Partially private repository?
Date: Sun, 31 Jan 2010 23:59:00 -0500	[thread overview]
Message-ID: <78d8a6b51001312059s1811b631y838679a3f63188b0@mail.gmail.com> (raw)
In-Reply-To: <32541b131001291410g252ddff4lbf04ac7c1d2d33fc@mail.gmail.com>

On Fri, Jan 29, 2010 at 5:10 PM, Avery Pennarun <apenwarr@gmail.com> wrote:
> On Fri, Jan 29, 2010 at 5:01 PM, Daed Lee <daed@thoughtsofcode.com> wrote:
>> Hi, I'm wondering if git can handle the following use. I have a
>> project that started as private experiment, but has morphed into
>> something I'd like to release publicly. I want to give others access
>> to the repository, but only to commits after a certain cutoff date.
>> Commits prior to that date have things like hardcoded file paths,
>> emails, etc. that I'd like to keep private.
>>
>> I suppose the easiest thing to do would be to create a new repository,
>> add the project files to it, and make that public, however I'd like to
>> keep my private commit history along with the public commit history
>> going forward in a single repository if possible. Is there a way to do
>> this with git?
>
> You should probably split your history into two pieces: the "before"
> and "after" parts.  To split out the "after" part, you could use
> git-filter-branch
> (http://www.kernel.org/pub/software/scm/git/docs/v1.6.0.6/git-filter-branch.html).
>  Then, in your private copy of the repo, you could reattach the
> "before" part of the history using git grafts.

Going forward, if I made changes to my private repository (containing
the "before" and "after" parts) and pushed to the public repository
(containing only the "after" part), would this only push the commits
in the "after" part? Essentially, I want to develop in my private
repository and see my "before" and "after" changes when I "git
log/show", but only push the "after" changes to the public repository.

I've also been looking into private branches. Could I do something
like keep my "before" changes on a private branch, and then do all
future development on a public branch?

Thanks for the pointer to git grafts, I'll have to read up on it further.

  reply	other threads:[~2010-02-01  4:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-29 22:01 Partially private repository? Daed Lee
2010-01-29 22:10 ` Avery Pennarun
2010-02-01  4:59   ` Daed Lee [this message]
2010-02-01  8:20     ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=78d8a6b51001312059s1811b631y838679a3f63188b0@mail.gmail.com \
    --to=daed@thoughtsofcode.com \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).