{"id":15003485,"url":"https://github.com/charpeni/merge-drivers-cli","last_synced_at":"2025-04-09T23:07:34.621Z","repository":{"id":203110311,"uuid":"707325723","full_name":"charpeni/merge-drivers-cli","owner":"charpeni","description":"A command-line interface to conveniently manage custom git merge drivers.","archived":false,"fork":false,"pushed_at":"2025-03-10T16:48:36.000Z","size":93,"stargazers_count":4,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T23:07:28.241Z","etag":null,"topics":["git","merge-driver","merge-drivers"],"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/charpeni.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}},"created_at":"2023-10-19T17:02:38.000Z","updated_at":"2025-03-10T16:48:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"98e943d6-1149-4d6e-a78e-8d883b2786d6","html_url":"https://github.com/charpeni/merge-drivers-cli","commit_stats":null,"previous_names":["charpeni/merge-drivers"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Fmerge-drivers-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Fmerge-drivers-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Fmerge-drivers-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charpeni%2Fmerge-drivers-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charpeni","download_url":"https://codeload.github.com/charpeni/merge-drivers-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125625,"owners_count":21051770,"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":["git","merge-driver","merge-drivers"],"created_at":"2024-09-24T18:58:39.341Z","updated_at":"2025-04-09T23:07:34.606Z","avatar_url":"https://github.com/charpeni.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Merge Drivers CLI\n\n\u003cimg height=\"125\" src=\"https://github.com/charpeni/merge-drivers-cli/assets/7189823/88ff5ee8-ea54-4c0e-b51e-39c9474d1990\" alt=\"CLI's logo\" align=\"right\"\u003e\n\n[![Version](https://badge.fury.io/js/merge-drivers.svg)](https://www.npmjs.org/package/merge-drivers)\n[![Monthly Downloads](https://img.shields.io/npm/dm/merge-drivers)](https://www.npmjs.org/package/merge-drivers)\n[![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/charpeni/merge-drivers-cli/blob/main/LICENSE)\n\nA command-line interface to conveniently manage custom git merge drivers.\n\n\u003cbr /\u003e\n\n## Why\n\nGit offers the ability to define two types of custom merge drivers. The first one is global, accessible through `~/.gitconfig`. The second one is local, accessible through `.git/config`. The problem is that the configuration of these drivers is not very convenient as neither of these solutions are versioned.\n\nThis CLI aims to solve this problem by providing a simple and intuitive interface to manage these drivers.\n\n[📚 Use Custom Merge Driver to Simplify Git Conflicts](https://www.charpeni.com/blog/use-custom-merge-driver-to-simplify-git-conflicts).\n\n## Usage\n\nMerge drivers are defined within a configuration file that should be living at the root of your project named as `.merge-drivers.yml`. This file is a YAML file that should contain a list of drivers (under `merge-drivers` key). Each driver is defined by a key, name, and a driver (command). Here is an example of such a file:\n\n```yaml\nmerge-drivers:\n  yarn:\n    name: 'yarn merge driver'\n    driver: 'yarn install'\n```\n\nFrom there, you will be able to use the following commands:\n\nIdeally, we would like to automate the installation of those merge drivers.\n\n\u003e [!WARNING]\n\u003e It could be achieved by using a `prepare` script in your `package.json` file. However, it may not possible depending on your package manager (_e.g., Yarn 2 and above don't execute `prepare`, so you would want to look into `postinstall`, see [Husky documentation for Yarn 2+](https://typicode.github.io/husky/getting-started.html#yarn-2) as a good reference_).\n\n### Install\n\nInstalls merge drivers based on the provided config.\n\n\u003e [!NOTE]\n\u003e Automatically executes `clean` command before installing, unless `--no-clean` is specified.\n\n```sh\nnpx merge-drivers install [merge-drivers...] [--no-clean]\n```\n\n### Uninstall\n\nUninstalls merge drivers based on the provided config.\n\n```sh\nnpx merge-drivers uninstall [merge-drivers...] [--no-clean]\n```\n\n### Clean\n\nCleans merge drivers by uninstalling the ones that are disabled based on the provided config.\n\n\u003e [!NOTE]\n\u003e Automatically executed as part of `install` command, unless `--no-clean` is specified.\n\n```sh\nnpx merge-drivers clean\n```\n\n## License\n\nmerge-drivers is [MIT licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharpeni%2Fmerge-drivers-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharpeni%2Fmerge-drivers-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharpeni%2Fmerge-drivers-cli/lists"}