I have problems with merging two unconnected git branches. The situation is the following: originally the was a svn repository, at one point a new git repository with the code from svn as an initial commit - without any history was created. And some changes already made etc.
Now i imported the old svn history to this existing repository on a new branch, from-svn
. Now the repository contains one branch, master
, where all the work since switching to the git repository is stored, and one from-svn
where the old commits leading up to the initial commit in the master
are stored. However for git they seem to be unrelated (understandably and of course probably).
Now i want to connect it somehow, to have the complete history on one branch. Is this possible? I tried merging, but i cant. git merge master
(also the other way around) tells me everything is up-to-date (also tried --allow-unrelated-histories
). If specify the most recent commit-id it tells me it is not something we can merge
, even with --allow-unrelated-histories
.
Any ideas?
Edit:
It has been some time, but just wanted to say, while some of the responses seems like valid options, i never had the opportunity to try them out. Particularly because i found out, that the problems i was facing were caused by some mess up on the local repo. I checked out the repo to a new location in the same state, but this time i could merge with --allow-unrelated-histories
, which was exactly what i wanted.