{"id":24850211,"url":"https://github.com/ankddev/gh-fork-sync","last_synced_at":"2026-04-19T14:36:30.791Z","repository":{"id":274189363,"uuid":"922180469","full_name":"ankddev/gh-fork-sync","owner":"ankddev","description":"Simple GitHub CLI extension to keep your fork up-to-date","archived":false,"fork":false,"pushed_at":"2025-05-30T15:55:24.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T22:19:53.222Z","etag":null,"topics":["cli","fork","gh-extension","github","github-cli","github-cli-extension","sync-fork"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ankddev.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":"2025-01-25T14:35:58.000Z","updated_at":"2025-05-30T15:55:24.000Z","dependencies_parsed_at":"2025-05-30T16:54:06.148Z","dependency_job_id":"db6383d8-d789-418e-830c-9b70b6e6becc","html_url":"https://github.com/ankddev/gh-fork-sync","commit_stats":null,"previous_names":["ankddev/gh-fork-sync"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ankddev/gh-fork-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fgh-fork-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fgh-fork-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fgh-fork-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fgh-fork-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankddev","download_url":"https://codeload.github.com/ankddev/gh-fork-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fgh-fork-sync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264537991,"owners_count":23624426,"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","fork","gh-extension","github","github-cli","github-cli-extension","sync-fork"],"created_at":"2025-01-31T13:17:40.318Z","updated_at":"2026-04-19T14:36:25.764Z","avatar_url":"https://github.com/ankddev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003egh-fork-sync\u003c/h1\u003e\n\u003ch6 align=\"center\"\u003eGitHub CLI extension to sync your fork with the upstream repository\u003c/h6\u003e\n\n\u003cimg align=\"center\" src=\"preview.png\" alt=\"Preview\" /\u003e\n\n## Features\n\n- Sync your fork with the upstream repository\n- Rebase instead of merge\n- Set upstream and origin branch names\n- Force push the changes\n- Preview the commands without executing them\n\n## Installation\n\nFirstly, [install the GitHub CLI](https://github.com/cli/cli#installation)\n\nThen, install the extension:\n\n```sh\ngh extension install ankddev/gh-fork-sync\n```\n\n## Usage\n\n\n```sh\ngh fork-sync \u003coptions\u003e\n```\n\nTo see the list of available options, run:\n```sh\ngh fork-sync --help\n```\n### Basic usage\nIf run without arguments it will sync local `main` branch with the upstream `main` branch and push the changes to the origin.\n\n```sh\ngh fork-sync\n```\n\nIt will execute the following commands:\n\n```sh\ngit remote add upstream \u003cupstream-repository-url\u003e\ngit fetch upstream\ngit merge upstream/main\ngit push origin HEAD:main\n```\n\n\u003e [!TIP]\n\u003e You can see what commands will be executed by running `gh fork-sync` with `--dry-run` option.\n\n### Specifying branch names\n\nYou can specify the branch names for the upstream and origin repositories.\n\n```sh\ngh fork-sync --upstream-branch=main --origin-branch=feature\n```\n\nIt will execute the following commands:\n\n```sh\ngit remote add upstream \u003cupstream-repository-url\u003e\ngit fetch upstream\ngit merge upstream/main\ngit push origin HEAD:feature\n```\n\nIn this example you can omit `--upstream-branch` option, because it will use the default branch name from the upstream repository.\n\n```sh\ngh fork-sync --origin-branch=feature\n```\n\n### Force push\n\nYou can force push the changes to the origin repository by using `--force` option.\n\n```sh\ngh fork-sync --force\n```\n\nIt will execute the following commands:\n\n```sh\ngit remote add upstream \u003cupstream-repository-url\u003e\ngit fetch upstream\ngit merge upstream/main\ngit push -f origin HEAD:main\n```\n\n### Rebase\n\nYou can use `--rebase` option to rebase the changes instead of merging them.\n\n```sh\ngh fork-sync --rebase\n```\n\nIt will execute the following commands:\n\n```sh\ngit remote add upstream \u003cupstream-repository-url\u003e\ngit fetch upstream\ngit rebase upstream/main\ngit push origin HEAD:main\n```\n\nUsually you have to use `--rebase` option with `--force` option.\n\n```sh\ngh fork-sync --rebase --force\n```\n\nIt will execute the following commands:\n\n```sh\ngit remote add upstream \u003cupstream-repository-url\u003e\ngit fetch upstream\ngit rebase upstream/main\ngit push -f origin HEAD:main\n```\n\n### Dry run\n\nYou can see the commands that would be executed by using `--dry-run` option.\n\n```sh\ngh fork-sync --dry-run\n```\n\nIt will print the commands that would be executed and exit.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a PR.\n\n### Build instructions\nClone the repository and run `go build` in the root directory.\n\n```sh\ngit clone https://github.com/ankddev/gh-fork-sync.git\ncd gh-fork-sync\ngo build\n```\n\nThen you can install the extension by running `gh extension install .` in the root directory.\n\n```sh\ngh extension install .\n```\n\n### Testing\n\nYou can test the extension by running `go test` in the root directory.\n\n```sh\ngo test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankddev%2Fgh-fork-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankddev%2Fgh-fork-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankddev%2Fgh-fork-sync/lists"}