{"id":28412072,"url":"https://github.com/sabmeua/git-accept","last_synced_at":"2026-05-10T16:42:31.034Z","repository":{"id":129265436,"uuid":"225785561","full_name":"sabmeua/git-accept","owner":"sabmeua","description":"Easy to merge git conflicts to accept both changes.","archived":false,"fork":false,"pushed_at":"2019-12-09T07:48:54.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-24T07:37:24.400Z","etag":null,"topics":["git","git-extension"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sabmeua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-12-04T05:21:10.000Z","updated_at":"2019-12-09T07:46:11.000Z","dependencies_parsed_at":"2023-05-17T23:45:41.108Z","dependency_job_id":null,"html_url":"https://github.com/sabmeua/git-accept","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sabmeua/git-accept","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabmeua%2Fgit-accept","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabmeua%2Fgit-accept/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabmeua%2Fgit-accept/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabmeua%2Fgit-accept/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sabmeua","download_url":"https://codeload.github.com/sabmeua/git-accept/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabmeua%2Fgit-accept/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265167486,"owners_count":23721453,"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","git-extension"],"created_at":"2025-06-02T19:44:56.543Z","updated_at":"2026-05-10T16:42:25.990Z","avatar_url":"https://github.com/sabmeua.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-accept\n\nEasy to merge git conflicts to accept both changes.\n\n[![CircleCI](https://circleci.com/gh/sabmeua/git-accept.svg?style=svg)](https://circleci.com/gh/sabmeua/git-accept)\n\n## What's this\n\nWhen git merge/rebase shows you that it couldn't resolve all of your conflicts automatically,\nyou will try to solve using `git checkout` with option `--theirs` , `--ours` or manually edit with `git mergetool`.\n\nHowever, sometimes you may want to simply adopt both changes. In that case if using an editor like Atom or VSCode,\nit can choose the menu to solve it but there isn't in git cli. This is a simple git extension subcommand that does just that.\n\n### Example\n\nIf there is a conflict as follows.\n\n```sh\n$ git diff file\ndiff --cc file\nindex b414108,9f9a0f9..0000000\n--- a/file\n+++ b/file\n@@@ -1,6 -1,6 +1,11 @@@\n  1\n  2\n++\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD\n +3\n +4\n++=======\n+ 三\n+ 四\n++\u003e\u003e\u003e\u003e\u003e\u003e\u003e develop\n  5\n  6\n```\n\nIt can merge like this with `git accept`.\n\n```sh\n$ git accept theirs file\n$ cat file\n1\n2\n三\n四\n5\n6\n\n$ git accept ours file\n$ cat file\n1\n2\n3\n4\n5\n6\n\n$ git accept theirs-then-ours file\n$ cat file\n1\n2\n三\n四\n3\n4\n5\n6\n\n$ git accept ours-then-theirs file\n$ cat file\n1\n2\n3\n4\n三\n四\n5\n6\n```\n\n## Usage\n\n```sh\ngit accept \u003cmerge plan\u003e \u003cfile\u003e\n```\n\n### Available merge plans\n\n* `ours`, `2` : Accept incoming changes. alias of `git checkout --ours`, `git checkout -2`.\n* `theirs`, `3` : Accept current changes. alias of `git checkout --theirs`, `git checkout -3`.\n* `ours-then-theirs`, `23` : Accept both current and incoming changes in the order of `ours`, `theirs`.\n* `theirs-then-ours`, `32` : Accept both current and incoming changes in the order of `theirs`, `ours`.\n* `cancel` : Discard local changes and revert to conflict. alias of `git checkout -m`.\n\n## Instration\n\nPlace `git-accept` in your PATH and add `+x` permission, and git will make it available as a `accept` subcommand.\nIf you no longer need it, simply remove the file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabmeua%2Fgit-accept","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsabmeua%2Fgit-accept","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabmeua%2Fgit-accept/lists"}