Ive done some searches and read a git book and some places on the web like git by example, but I cannot find the correct way to do this.
I have two git repos that sit on two different machines. Each of these git repos holds configuration for a program. When you compare the two repos, some parts of the configuration are identical and some parts are not.
What we want to do is create a third repository, and merge the contents of the other two repositories into this new one. What I hope to achieve by this is to have one repository that has all the data from the other two repos but only have one copy of it. This way, we hope that git will tell us what is different between the two repos and merge these changes together into one.
Hopefully this is easy enough to understand.
I have tried creating a new git repo, doing a git clone of one server, creating a new branch and doing a git clone of the other repo then asking git to merge them. I've also tried the subtree merge and neither of these produced what I wanted.
The first example, simply said remove all files and add a bunch of new files. This isnt what we wanted, we wanted a single git repository holding a single copy of configuration produced as a result of merging the two remote repos together.
If anyone can help with this problem it would be much appreciated.
By the way, both repos data consists of the same files with the same file names but slightly different content.