Subject: Joining two development histories together and then splitting them back apart.

From: Pete/Piet Delaney <[email-masked]>
Date: Thu, 14 Feb 2008 21:41:00 -0800

Hi:

I thought I'd check on the right procedure for merging two branches and
then forking them off from that merged point. It's been a while since I
set up git, I've been hacking on the kernel for a couple of months and
now want to merge it with our old CVS repository that I imported into git.

First, on a remote machine I pull the repo and then check out a
tracking branch; right? Ex:

~  git clone git.bluelane.com:/home/git/blux

~  git checkout -b engg origin/engg
~  Branch engg set up to track remote branch refs/remotes/origin/engg.
~  Switched to a new branch "engg"

Now I'd like to merge it with another branch, which is kinda
of like the master branch, but it's actually not the master/head.
So in my case I want to merge with origin/rel2_branch from the
master git repo.

So as I recall I set up my .git/config with:

	[diff]
~        	external = "/usr/bin/kompare"
~        	renames = true

	[merge]
~        	tool = "/usr/bin/kdiff3"

Next I do a:

	git-merge origin/rel2_branch

hopefully kcompare will then pop up for the merge resolution.

Now that the two branches are in sync I'd like to split the
two branches and then push that up the the remote repository
and hopeful all new changes to the engg branch will not be
seen if someone pulls out the rel2_branch.

I'm not sure if git will let me do all of this. I recall
some security stuff preventing the code from being easily
push up to the top repository. Also I'm not sure if this
part can be done in the local repo on my workstation.

I suppose it will all start coming back to me as I mess
with it tomarrow.

I thought it would likely be worthwhile to check with the git
mailing list to get a few pointers to hopefully save some time
tomarrow with the merge. I had the trees merged a few months
ago but the repo got a bit weird with my copying my merged
repo to the git repo and getting origins in the branch names
on the main repository.

- -piet