Creating a new branch based off sub-directory of an existing branch?

Philippe Lhoste PhiLho at GMX.net
Mon Aug 24 17:30:14 BST 2009


On 24/08/2009 18:06, keith321 wrote:
> I was wondering if anyone knew of an efficient way of creating a new branch
> based off of a part (e.g. sub-directory) of an existing branch?
> 
> The most straight-forward way I can think of would be to simply grab a copy
> of the existing, delete everything except the desired portions, commit, and
> push to the new location. This would mean, however, that the new branch is
> also keeping a copy of the history of all of the irrelevant files.

You can use the split command, I think. But if you branch the sub-part, it will keep the 
whole history, indeed.

-- 
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --




More information about the bazaar mailing list