Solution for Managing custom_field.json Merge Conflicts in Frappe

Hi Frappe Community :waving_hand:

I’d like to share a useful solution related to handling merge conflicts in custom_field.json that was introduced by my colleague.

As many of you might have experienced, resolving conflicts in custom_field.json during app development can be quite challenging—especially when multiple developers are working on the same project and making parallel customizations across environments. This often leads to frequent and complex merge conflicts.

My colleague has come up with a clean and practical approach to manage and significantly reduce these conflicts.

He shared the proposed solution here for reference and discussion:
https://github.com/frappe/frappe/issues/38111

Unfortunately, He currently unable to create a Pull Request for this contribution since only repository collaborators have permission to do so. I’d really appreciate it if a maintainer or collaborator could guide us on how to proceed with submitting this improvement, or help in reviewing and pushing it forward.

It would be great if any Frappe maintainers could take a look — @rmehta @ankush (or kindly requesting any maintainer to review).

Special thanks to @RohnRoy for working on this solution :raising_hands:

Looking forward to your feedback and suggestions!

Thanks in advance.

5 Likes

For anyone hitting this before #38111 lands, I’ve shipped a working
solution as an installable Frappe app:

Repo: GitHub - ananyo141/frappe-fixture-normalize · GitHub

Same per-target split layout proposed in #38111
(fixtures/custom_field/<dt>.json), plus:

  • strips modified field (parent level)
  • bench export-fixtures automatically overridden (no fork of frappe
    needed — uses click command name-collision via
    frappe/utils/bench_helper.py:get_app_groups)
  • after_migrate hook imports the split subdirs (stock
    sync_fixtures only globs top-level)
  • pre-commit hook for hand-edits
  • CI matrix on version-15 + version-16

Install:
bench get-app GitHub - ananyo141/frappe-fixture-normalize · GitHub
bench --site install-app frappe_fixture_normalize

Drop-in: existing bench export-fixtures --app <name> workflow keeps
working, output is now deterministic and split.

1 Like