git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Martin <tramjoe.merin@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: git@vger.kernel.org
Subject: Re: Private/public branches/repos workflow
Date: Thu, 5 May 2011 17:53:40 +0200	[thread overview]
Message-ID: <BANLkTinL6UYAKeBtLnU5+rvwmd+N0dYErw@mail.gmail.com> (raw)
In-Reply-To: <201105051535.p45FZQDY019419@no.baka.org>

Thanks for your quick answer!
It seems to be a solution a bit alike one I tested before sending my
initial question, using :
git symbolic-ref HEAD refs/heads/cleanmaster
But I am unsure of the result I am getting.
Are you suggesting that I should entirely replace my current 'public'
branch (there is no important history in there to keep apart from what
is already in the other, private, branch) by cleanmaster or that I
should keep using three branches and push from that third one
(cleanmaster) to the published repo ?
One thing I do not understand clearly is why with a detached (I guess
this is synonym to orphan ? At least when creating it ?) branch cannot
be then merged with the branch that was initially copied to create it
and just get the additional commits. Instead, it gets the whole
history. Being used to using merge between my public/private branches,
I am afraid that using that orphan branch might lead to disaster
eventually.

On Thu, May 5, 2011 at 5:35 PM, Seth Robertson <in-gitvger@baka.org> wrote:
>
> In message <BANLkTi=TLeePH0JDvnE0XPiCzXFxid9BWQ@mail.gmail.com>, Jerome Martin
> writes:
>
>    Is there any recommended workflow to achieve the result I am looking
>    for ? How are other people doing it ?
>
> Create an orphan branch.  Commit what you want onto it.  Push branch
> to a new repo as master.
>
> git checkout <basesha>
> git checkout --orphan cleanmaster
> git add -A
> git commit -m "base of public release"
> (mkdir ../newrepo; cd ../newrepo; git init --bare)
> git remote add cleanremote ../newrepo
> git push cleanremote cleanmaster:master
>
> You can then cherry pick/rebase from previous branches onto
> cleanmaster any subsequent commits that you want to keep history for.
>
> Another approach might be to finesse a shallow clone to do what you
> want.
>
>                                        -Seth Robertson



--
Jérôme Martin

  reply	other threads:[~2011-05-05 15:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 15:16 Private/public branches/repos workflow Jerome Martin
2011-05-05 15:35 ` Seth Robertson
2011-05-05 15:53   ` Jerome Martin [this message]
     [not found]   ` <BANLkTikFdV=nGW-L+3NVzP58uPiS5ui-9A@mail.gmail.com>
     [not found]     ` <201105052110.p45LAViP010495@no.baka.org>
2011-05-05 22:05       ` Jerome Martin
2011-05-05 18:14 ` Junio C Hamano
2011-05-05 20:43   ` Jerome Martin
2011-05-06  4:10     ` Junio C Hamano
2011-05-06  9:27       ` Jerome Martin

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=BANLkTinL6UYAKeBtLnU5+rvwmd+N0dYErw@mail.gmail.com \
    --to=tramjoe.merin@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).