On Thu, 3 Oct 2013 02:18:45 -0700 (PDT)
ruud <r.grosm...@gmail.com> wrote:
> I recently started a new branch in a project. It appeared that the
> branch only contained new software and was not based on the rest of
> the project. I want to move that branch to a new repository, but not
> all of the history of the original project. I found out with the help
> of google, it is possible to git-push a branch to a new repository,
> but then all the history of the project comes with it, not only from
> the point where the branch started.
> \ E-F-G
> Both D and E-F-G are based on C. I only want to move E-F-G to a new
> The best I can think of is this:
> * git push the branch to a new repository (giving A-B-C-E-F-G)
> * with git-rebase delete all of the old project commits A-B-C
> Is this the only way?
I think yes, this is the only way because you need to squash A-C into a
new commit, C', and then reapply E-G on top of it, and that's what
`git rebase` is goot at.
Note that you might as well do squashing in the original repo and then
push the modified history: first fork a new branch off G, then rebase
it, then push, then delete.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/groups/opt_out.