{"id":13743014,"url":"https://github.com/jonatanpedersen/git-json-merge","last_synced_at":"2025-04-06T18:17:35.307Z","repository":{"id":55525636,"uuid":"47101898","full_name":"jonatanpedersen/git-json-merge","owner":"jonatanpedersen","description":"A git merge driver that use xdiff to automatically resolve merge conflicts in json files. This project was inspired by git-po-merge.","archived":false,"fork":false,"pushed_at":"2024-03-18T11:23:30.000Z","size":78,"stargazers_count":114,"open_issues_count":5,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T17:10:03.487Z","etag":null,"topics":["cli","git","json","merge"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonatanpedersen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-11-30T07:19:48.000Z","updated_at":"2025-02-26T08:52:31.000Z","dependencies_parsed_at":"2024-04-10T19:43:21.593Z","dependency_job_id":"ebd8a20b-3910-4177-ba3e-9c6305e7f18e","html_url":"https://github.com/jonatanpedersen/git-json-merge","commit_stats":{"total_commits":63,"total_committers":5,"mean_commits":12.6,"dds":0.1428571428571429,"last_synced_commit":"c5572aceaba4a5df40dfd3a179cae516720c8a33"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatanpedersen%2Fgit-json-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatanpedersen%2Fgit-json-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatanpedersen%2Fgit-json-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatanpedersen%2Fgit-json-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonatanpedersen","download_url":"https://codeload.github.com/jonatanpedersen/git-json-merge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526768,"owners_count":20953143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","git","json","merge"],"created_at":"2024-08-03T05:00:38.909Z","updated_at":"2025-04-06T18:17:35.285Z","avatar_url":"https://github.com/jonatanpedersen.png","language":"JavaScript","funding_links":[],"categories":["Per-File Merge Drivers"],"sub_categories":[],"readme":"# git-json-merge\n\nA git merge driver that use [xdiff](https://github.com/dominictarr/xdiff) to automatically resolve merge conflicts in json files. It also detects indentation automatically. This project was inspired by [git-po-merge](https://github.com/beck/git-po-merge).\n\n[![@git-json-merge](https://circleci.com/gh/jonatanpedersen/git-json-merge.svg?style=shield)](https://app.circleci.com/pipelines/github/jonatanpedersen/git-json-merge)\n[![NPM Version](https://img.shields.io/npm/v/git-json-merge.svg)](https://www.npmjs.com/package/git-json-merge)\n\n## Install\n\nThis can be done one of two ways, globally or per-project/directory:\n\n### Globally\n\nInstall:\n\n```sh\nnpm install --global git-json-merge\n```\n\nAdd to `~/.gitconfig`:\n\n```ini\n[core]\n    attributesfile = ~/.gitattributes\n[merge \"json\"]\n    name = custom merge driver for json files\n    driver = git-json-merge %A %O %B\n```\n\nCreate `~/.gitattributes`:\n\n```ini\n*.json merge=json\n```\n\n### Single project / directory\n\nInstall:\n\n```sh\nnpm install git-json-merge --save-dev\n```\n\nUpdate git config:\n\n```sh\ngit config merge.json.driver \"$(npm bin)/git-json-merge %A %O %B\"\ngit config merge.json.name \"custom merge driver for json files\"\n```\n\nAdd the same `.gitattributes` where desired and commit.\nNote `.gitattributes` is only used after committed.\n\nHelpful docs:\n\n- http://git-scm.com/docs/gitattributes#_defining_a_custom_merge_driver\n- http://stackoverflow.com/questions/28026767/where-should-i-place-my-global-gitattributes-file\n\nThanks:\n\n- https://gist.github.com/mezis/1605647\n- http://stackoverflow.com/questions/16214067/wheres-the-3-way-git-merge-driver-for-po-gettext-files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonatanpedersen%2Fgit-json-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonatanpedersen%2Fgit-json-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonatanpedersen%2Fgit-json-merge/lists"}