{"id":21739468,"url":"https://github.com/daviddesimone/firemerge","last_synced_at":"2025-09-15T09:18:25.209Z","repository":{"id":83864467,"uuid":"70509907","full_name":"DavidDeSimone/FireMerge","owner":"DavidDeSimone","description":"A custom merge tool for merging Cocos Creator layouts","archived":false,"fork":false,"pushed_at":"2017-04-27T23:47:22.000Z","size":65,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T03:43:50.919Z","etag":null,"topics":["cocos-creator","cocos2d","cocos2d-js","cocos2d-x"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/DavidDeSimone.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-10-10T17:04:01.000Z","updated_at":"2024-04-26T05:01:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"762a4f5f-2cc9-4757-b16d-5cd0bf9828ae","html_url":"https://github.com/DavidDeSimone/FireMerge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DavidDeSimone/FireMerge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDeSimone%2FFireMerge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDeSimone%2FFireMerge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDeSimone%2FFireMerge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDeSimone%2FFireMerge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidDeSimone","download_url":"https://codeload.github.com/DavidDeSimone/FireMerge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDeSimone%2FFireMerge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275233978,"owners_count":25428519,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cocos-creator","cocos2d","cocos2d-js","cocos2d-x"],"created_at":"2024-11-26T06:09:07.681Z","updated_at":"2025-09-15T09:18:25.177Z","avatar_url":"https://github.com/DavidDeSimone.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"FireMerge is a custom tool for merging Cocos Creator layouts. It was origonally written for mecurial, but should work with git and svn.\n\n**Building**:\n\nFireMerge is built with cmake.\n\nOn Linux or Mac\n\n```\ngit clone https://github.com/DavidDeSimone/FireMerge\ncd FireMerge/\nmkdir build \u0026\u0026 cd build/\ncmake ..\nmake\nsudo make install\n```\n\n**Usage**:\n\nYou will need to set up a custom merge tool in your version control program of choice\n\n*Mecurial*\n\nAdd the following lines to your .hgrc\n\n```\n[merge-tools]\nmergetool.priority = 100\nmergetool.premerge = False\nmergetool.args = $local $other $base -o $output\nFireMerge = /usr/local/bin/FireMerge \n\n[merge-patterns]\n**.fire = /usr/local/bin/FireMerge\n**.prefab = /usr/local/bin/FireMerge\n```\n\nYou can customize the file locations firemerge will look for, or the location of fire merge by editing the merge-patterns.\n\n*Git*\n\nYou will need to add the following lines to your .gitattributes\n\n```\n**.fire merge=FireMerge\n**.prefab merge=FireMerge\n```\n\nAdd the following to your git config file\n\n```\n[merge \"FireMerge\"]\nname = FireMerge\ndriver = /usr/local/bin/FireMerge %A %O %B\n```\n\nOR run\n\n```\ngit config merge.FireMerge.driver \"/usr/local/bin/FireMerge %A %O %B\"\n```\n\n\n**Handling Merges**\n\nFireMerge does NODE based merging. This means that it will compare individually identified nodes against each other. If either of these nodes have been touched across branches, FireMerge will report a conflict you will need to manually resolve. Due to CocosCreator's array indexing pattern, conflicted nodes will occupy have the following format\n\n```\n    {\n        \"MINE \u003e\u003e\u003e\u003e\u003e\u003e\u003e\u003e\": {\n            \"__type__\": \"cc.Node\",\n            \"_active\": true,\n            \"_anchorPoint\": {\n                \"__type__\": \"cc.Vec2\",\n                \"x\": 0.5,\n                \"y\": 0.5\n            },\n            \"_cascadeOpacityEnabled\": true,\n            \"_children\": [\n                {\n                    \"__id__\": 3\n                }\n            ],\n            \"_color\": {\n                \"__type__\": \"cc.Color\",\n                \"a\": 255,\n                \"b\": 255,\n                \"g\": 255,\n                \"r\": 255\n            },\n            \"_components\": [\n                {\n                    \"__id__\": 4\n                }\n            ],\n            \"_contentSize\": {\n                \"__type__\": \"cc.Size\",\n                \"height\": 640,\n                \"width\": 960\n            },\n            \"_globalZOrder\": 0,\n            \"_id\": \"834f1BEjTBPUZb6xY6a58Mr\",\n            \"_localZOrder\": 0,\n            \"_name\": \"Canvas\",\n            \"_objFlags\": 0,\n            \"_opacity\": 255,\n            \"_opacityModifyRGB\": false,\n            \"_parent\": {\n                \"__id__\": 1\n            },\n            \"_position\": {\n                \"__type__\": \"cc.Vec2\",\n                \"x\": 480,\n                \"y\": 320\n            },\n            \"_prefab\": null,\n            \"_rotationX\": 0,\n            \"_rotationY\": 0,\n            \"_scaleX\": 1,\n            \"_scaleY\": 1,\n            \"_skewX\": 0,\n            \"_skewY\": 0,\n            \"_tag\": -1,\n            \"groupIndex\": 0\n        },\n        \"THEIRS \u003c\u003c\u003c\u003c\u003c\u003c\u003c\u003c\": {\n            \"__type__\": \"cc.Node\",\n            \"_active\": true,\n            \"_anchorPoint\": {\n                \"__type__\": \"cc.Vec2\",\n                \"x\": 0.5,\n                \"y\": 0.5\n            },\n            \"_cascadeOpacityEnabled\": true,\n            \"_children\": [\n                {\n                    \"__id__\": 5\n                }\n            ],\n            \"_color\": {\n                \"__type__\": \"cc.Color\",\n                \"a\": 255,\n                \"b\": 255,\n                \"g\": 255,\n                \"r\": 255\n            },\n            \"_components\": [\n                {\n                    \"__id__\": 4\n                }\n            ],\n            \"_contentSize\": {\n                \"__type__\": \"cc.Size\",\n                \"height\": 640,\n                \"width\": 960\n            },\n            \"_globalZOrder\": 0,\n            \"_id\": \"834f1BEjTBPUZb6xY6a58Mr\",\n            \"_localZOrder\": 0,\n            \"_name\": \"Canvas\",\n            \"_objFlags\": 0,\n            \"_opacity\": 255,\n            \"_opacityModifyRGB\": false,\n            \"_parent\": {\n                \"__id__\": 1\n            },\n            \"_position\": {\n                \"__type__\": \"cc.Vec2\",\n                \"x\": 480,\n                \"y\": 320\n            },\n            \"_prefab\": null,\n            \"_rotationX\": 0,\n            \"_rotationY\": 0,\n            \"_scaleX\": 1,\n            \"_scaleY\": 1,\n            \"_skewX\": 0,\n            \"_skewY\": 0,\n            \"_tag\": -1,\n            \"groupIndex\": 0\n        }\n    },\n```\n\nHere, this conflicted node has been filled with two keys, MINE and THEIRS. It should be replaced with the resulting non-conflicted node. An example output of the merge would be\n\n```\n{\n            \"__type__\": \"cc.Node\",\n            \"_active\": true,\n            \"_anchorPoint\": {\n                \"__type__\": \"cc.Vec2\",\n                \"x\": 0.5,\n                \"y\": 0.5\n            },\n            \"_cascadeOpacityEnabled\": true,\n            \"_children\": [\n                {\n                    \"__id__\": 5,\n\t\t    \"__id__\": 3\n                }\n            ],\n            \"_color\": {\n                \"__type__\": \"cc.Color\",\n                \"a\": 255,\n                \"b\": 255,\n                \"g\": 255,\n                \"r\": 255\n            },\n            \"_components\": [\n                {\n                    \"__id__\": 4\n                }\n            ],\n            \"_contentSize\": {\n                \"__type__\": \"cc.Size\",\n                \"height\": 640,\n                \"width\": 960\n            },\n            \"_globalZOrder\": 0,\n            \"_id\": \"834f1BEjTBPUZb6xY6a58Mr\",\n            \"_localZOrder\": 0,\n            \"_name\": \"Canvas\",\n            \"_objFlags\": 0,\n            \"_opacity\": 255,\n            \"_opacityModifyRGB\": false,\n            \"_parent\": {\n                \"__id__\": 1\n            },\n            \"_position\": {\n                \"__type__\": \"cc.Vec2\",\n                \"x\": 480,\n                \"y\": 320\n            },\n            \"_prefab\": null,\n            \"_rotationX\": 0,\n            \"_rotationY\": 0,\n            \"_scaleX\": 1,\n            \"_scaleY\": 1,\n            \"_skewX\": 0,\n            \"_skewY\": 0,\n            \"_tag\": -1,\n            \"groupIndex\": 0\n        }\n\n```\n\nIn our example here, two branches both added a node to a scene. Our resolution was to manually merge their child arrays, adding them together. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaviddesimone%2Ffiremerge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaviddesimone%2Ffiremerge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaviddesimone%2Ffiremerge/lists"}