What is the recommended way to create a branch that contains a subset of
your working tree? The use case is creating a distribution branch that
will be pushed out to a server and I only want to include files that are
ready to be released.
Thanks,
rg
On Mon, Feb 22, 2010 at 1:07 PM, Ron Garret [off-list ref] wrote:
What is the recommended way to create a branch that contains a subset of
your working tree? The use case is creating a distribution branch that
will be pushed out to a server and I only want to include files that are
ready to be released.
Thanks,
rg
Well we did something similar at $dayjob. We had a repository
consisting of code we wanted to release under the LGPL and code we
wanted to keep private.
We ended up using git filter-branch to create 2 new repositories with
commit histories one for the GPL stuff and one for the proprietary
stuff. We then started working on them as 2 separate repositories.
This is possibly a different use case for your situation. We were
happy to wear the fact that our developers would have to re-clone the
2 repos but it sounds like you may want to be able to submit common
code when it is logically complete.
Another suggestion would be to use branches instead of separate repos.
This similar to how git.git is run. i.e. "master" is the stable
branch, "next" is the proving ground for features that have been
cooked sufficiently and "pu" is where new topics get introduced
(disclaimer: this may be an inaccurate representation of how git.git
is _actually_ run but you get the gist). This of course assumes you
are happy for the unstable code to be visible.