Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to merge two ged files #312

Open
emilepetrone opened this issue Jun 7, 2020 · 4 comments
Open

How to merge two ged files #312

emilepetrone opened this issue Jun 7, 2020 · 4 comments

Comments

@emilepetrone
Copy link

I am running Mac release v39.5.1 and am trying to merge two ged files. I do not know GO so maybe I am just missing something very basic.

In following the documentation, I see the CLI commands but do not see how to merge two files.

$ ./gedcom
2020/06/07 10:44:26 ERROR: Missing command, use one of:
	./gedcom diff      - Compare gedcom files
	./gedcom publish   - Publish as HTML
	./gedcom query     - Query with gedcomq
	./gedcom tune      - Used to calculate ideal weights and similarities
	./gedcom version   - Show version and exit
	./gedcom warnings  - Show warnings for a gedcom file

How do I merge two ged files?

@elliotchance
Copy link
Owner

Hi @emilepetrone - I've been meaning to create a separate command for it but haven't got around to it. You can use query:

./gedcom query -gedcom file1.ged -gedcom file2.ged -format gedcom 'MergeDocumentsAndIndividuals(Document1, Document2)' > merged.ged

Let me know if this works for you.

@emilepetrone
Copy link
Author

Thank you for the reply, @elliotchance it ran without error. What would be the best way to validate the merger? I can see the file size is roughly 2x each of the individual files.

When I upload the new GED file to Ancestry.com, it gave me an error to reupload. I inspected the file and noticed it was missing some header information that I added (pure guessing that was the issue. The error didn't give me any information to go on). When I uploaded the merged GED file again, it succeeded but started the tree at a weird point. I'm not sure if that is due to the merger or Ancestry.com playing some games

What do you think is the best way to validate the new file? Thanks again!

@elliotchance
Copy link
Owner

The output should be valid GEDCOM, if not that is a bug. It's helpful that you mention the header information may be mangled because in the case of a merge it creates a new GEDCOM file with the result, rather than modifying one with the other, so some information may be lost.

Can put the missing header information here?

As for the tree itself, it's possible that is also a bug. I would need more information about what it did vs what you expected from it?

@emilepetrone
Copy link
Author

To make sure it wasn't an intermittent bug with Ancestry, I just merged the 2 GED files again.

  • Attempt 1: Without changing the header information, and this file errored.

Screen Shot 2020-06-12 at 9 24 46 AM

* Attempt 2: I added the following lines to the top of the newly merged file. And the upload succeeded.
0 HEAD
1 CHAR UTF-8
1 SOUR Ancestry.com Family Trees
2 VERS (2010.3)
2 NAME Ancestry.com Family Trees
2 CORP Ancestry.com
1 GEDC
2 VERS 5.5

The 2 GED files I am trying to merge are trees I created in Ancestry, exported, and am now trying to merge. One tree is my Mom's family. The other is my Father's family. I am the common person at the bottom of both.

When I merge them, I was expecting them to see I am the common person at the top of each file. However, it doesn't appear to do that. It finds that one of my ancestors is the common person and starts there.

In looking more closely at the files, I have 2 different values for 0 @P455@ INDI and the ancestor it starts with has a matching INDI value in both files. I am guessing that is ultimately the issue. Without the INDI values matching, it can't match on me and that is causing the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants