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

Re: Partially private repository?

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jan 29, 2010, 22:10 UTC
Message-ID
<32541b131001291410g252ddff4lbf04ac7c1d2d33fc@mail.gmail.com>
In-Reply-To
<78d8a6b51001291401ib93976el25c03694d53aaced@mail.gmail.com>
On Fri, Jan 29, 2010 at 5:01 PM, Daed Lee <daed@thoughtsofcode.com> wrote:
Show 12 quoted lines
> 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.
Have fun,
Avery
Previous: Daed LeeNext: Daed Lee
Message 2 of 4 in “Partially private repository?”
  1. Daed LeeJan 29, 2010
  2. Avery PennarunJan 29, 2010
  3. Daed LeeFeb 1, 2010
  4. Johannes SixtFeb 1, 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.