Skip to content

glx merge-persons ​

Merge two person entities, keeping the first and folding in the second

Synopsis ​

Consolidate two person entities into one. The keep-id is retained; the drop-id's properties, notes, and cross-references are folded into it, then the drop-id person file is removed.

Property merging:

  • Properties present only on drop are copied verbatim.
  • Identical values agree silently.
  • Temporal properties combine non-conflicting dated and undated history, including mixed scalar, structured, and list representations.
  • Other multi-value lists are unioned with deep-equal deduplication.
  • Genuine conflicts default to keep's value. --keep-newest or --keep-oldest resolves dated collisions while preserving unrelated history.
  • Approximate date values use ±2 years; --approximation-years overrides it.

Notes are combined per --notes-strategy (default: append).

This is the natural follow-on to glx duplicates: once you've identified that two person records are the same individual, this command consolidates them in a single atomic operation.

glx merge-persons <keep-id> <drop-id> [flags]

Examples ​

  # Merge person-jungk-1750 into person-juncker-1750
  glx merge-persons person-juncker-1750 person-jungk-1750 --archive ./archive

  # Preview the merge
  glx merge-persons person-a person-b --archive ./archive --dry-run

  # Resolve dated conflicts by picking the later entry
  glx merge-persons person-a person-b --archive ./archive --keep-newest

  # Replace keep's notes with drop's
  glx merge-persons person-a person-b --archive ./archive --notes-strategy prefer-drop

Options ​

      --approximation-years int   Tolerance in years for ABT, EST and CAL date values (0–10000) (default 2)
  -a, --archive string            Path to GLX archive (default ".")
      --dry-run                   Show what would change without writing
  -h, --help                      help for merge-persons
      --keep-newest               For conflicting temporal properties, keep the entry with the later date
      --keep-oldest               For conflicting temporal properties, keep the entry with the earlier date
      --notes-strategy string     How to combine notes: append | prefer-keep | prefer-drop (default "append")

Options inherited from parent commands ​

  -q, --quiet   Suppress non-error output (where supported)

SEE ALSO ​

  • glx - GENEALOGIX CLI - Manage and validate genealogy archives

Licensed under Apache License 2.0