Anas Platyrhynchos - 8 months ago 46
Git Question

# Extracting branch into another under TortoiseGit

Working under TortoiseGit (on Windows 7), imagine having a MASTER branch from which a SPECIFIC branch has been built.

The SPECIFIC contains some parameter changes and some general code changes.

## My Question

How do I create a new branch (starting from the MASTER) which keeps the code changes only?

(Of course, I will sort out what exactly is a code change and will be kept. )

## What I've tried

So, I created the NEW branch from MASTER, and tried to rebase SPECIFIC onto NEW. All that allows me to do, is do a fast forward merge which is not very interesting.

I sought inspiration from rewrite Git history but I don't see how to get the equivalent to
git rebase -i
in the TortoiseGit interface. I also looked in the TortoiseGit manual which correctly tells me that rebase is quite complex.

Conceptually, what I really want to do is to
diff
SPECIFIC and NEW, and manually sort out the differences.

Even better, NEW could end up being identical SPECIFIC but consisting of exactly two commits: the code changes and the parameter changes.

Any

Rebasing (rebase -i) also works from the log dialog - however it changes the history and puts the commits of one branch onto another branch. First switch to the branch you want to rebase, then right click on the commit/branch you want to rebase your changes onto and select "Rebase". Then a rebase -i equivalent dialog is shown where you can re-order, de-select, edit and squash commits.