{"id":24093065,"url":"https://github.com/jwpkg/gitversion","last_synced_at":"2025-05-07T05:05:22.257Z","repository":{"id":219919007,"uuid":"742927538","full_name":"jwpkg/gitversion","owner":"jwpkg","description":"Complete customizable git-based release management system","archived":false,"fork":false,"pushed_at":"2025-04-17T10:35:11.000Z","size":2965,"stargazers_count":3,"open_issues_count":16,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T05:05:15.245Z","etag":null,"topics":["ci-cd","conventional-commits","git","monorepo","npm","release","versioning","yarn","yarn-berry","yarn-workspaces"],"latest_commit_sha":null,"homepage":"https://www.cp-utils.com/projects/gitversion/latest/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwpkg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-01-13T19:30:50.000Z","updated_at":"2025-04-17T10:35:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"b37b7892-346e-4d16-bb6f-ae82082d88a8","html_url":"https://github.com/jwpkg/gitversion","commit_stats":null,"previous_names":["cp-utils/gitversion","jwpkg/gitbump"],"tags_count":68,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwpkg%2Fgitversion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwpkg%2Fgitversion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwpkg%2Fgitversion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwpkg%2Fgitversion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwpkg","download_url":"https://codeload.github.com/jwpkg/gitversion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252817010,"owners_count":21808705,"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":["ci-cd","conventional-commits","git","monorepo","npm","release","versioning","yarn","yarn-berry","yarn-workspaces"],"created_at":"2025-01-10T09:24:11.064Z","updated_at":"2025-05-07T05:05:22.240Z","avatar_url":"https://github.com/jwpkg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gitversion\n\nGitversion is a complete customizable git-based release management system. Primarily focused on package releases.\n\n![NPM Version](https://img.shields.io/npm/v/gitversion)\n\n## Key concepts\n\n- [Branch based release strategy](#branch-based-release-strategy)\n- [Tag based versioning (no versions in files)](#tag-based-versioning)\n- [Conventional commit based bumps](#conventional-commit-based-bumps)\n- [Native monorepo support](#native-monorepo-support)\n- [Split stage publish](#split-stage-publish)\n- Plugin based customization\n\n## How does it work\n\n### Branch based release strategy\n\nThe core concept of gitversion evolves around branch detection and branch types.\n\nGitversion defines the following types:\n- main/master branch (default branch name **'main'**)\n- release branches (default matches **'release/*'**)\n- feature branches (default matches **'feature/*'**)\n\nThe names and detections can be customized to your own need.\n\nDepending on the detected branch types the system will make different choices:\n\n| Branch           | Branch type | Version namings | (NPM) Release tag | Changelog | Notes                                                                |\n| :--------------- | :---------- | :-------------: | :---------------: | -- | :------------------------------------------------------------------- |\n| main             | main        | 1.0.0           | latest            | yes |Official releases                                                    |\n| release/next     | release     | 1.0.0\u0026#8209;next.0    | next              | yes | (Pre) releases                                                       |\n| feature/gh\u0026#8209;1234  | feature     | 1.0.0\u0026#8209;gh\u0026#8209;1234.0 | gh\u0026#8209;1234 (*) | no | Feature release. I.e. to let the customer test the requested feature |\n\n\u003e You can chose if and how feature releases are released. This can differ from release branches. \n\n### Tag based versioning\n\nLike most release systems gitversion will add a tag for each release. This will follow the tag naming with a prefix (default 'v'). I.e.\n\n- v1.0.0\n- v1.2.3-next.0\n\nThe difference of gitversion is that the tags are the only source of truth. It does not care about versions inside files and will keep them even on the default \"0.0.0\".\n\nThere are two main advantages of this strategy:\n\n- One source of truth. Easy to see in git history what the current state is\n- No more merge conflicts due to mismatches of versions. Otherwise this will happen constantly with feature/release strategies\n\nGitversion has 2 commands to work with this git-only version strategy:\n\n#### Restore \n```bash\nyarn gitversion restore\n```\n\nThe output will be something like:\n\n![gitversion restore](./assets/restore.png)\n\nAs you see with this you wil get all versions back in package.json files.\n\n#### Reset \n```bash\nyarn gitversion reset\n```\n\nThe output will be something like:\n\n![gitversion reset](./assets/reset.png)\n\nAs you see with this you wil reset all versions back to '0.0.0'.\n\n### Conventional commit based bumps\n\nGitversion works with the concept of a \"bump\". This is one of the key commands:\n\n```bash\nyarn gitversion bump\n```\n\nBump will do the following steps:\n\n- [Restore](#restore) the current status from git\n- Read the git history and search for [Conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) style messages\n- Define a bump type based on the outcome\n- Update the workspaces with the new version\n- Udate the workspaces with the workspace specific changelogs\n- Create a bump manifest in the **gitversion.out** folder containing versions and changelogs\n\n### Native monorepo support\n\nGitversion is build for monorepos with multiple workspaces. It will detect all (public) workspaces and use them during bump.\n\nThere are 2 main operation modes:\n- [global versioning](#Global-versioning)\n- [independent versioning](#Independent-versioning)\n\n#### Global versioning\n\nThis is the default mode. This will keep all versions of all workspaces the same. This is useful for monorepos with series of packages (i.e. ***'@aws-sdk/*'***)\n\n#### Independent versioning\n\nThis will use unique versions per workspace in the mono repo. Based on the path of the committed files it will decide if the specific workspace needs a bump and which bump type.\n\n### Split stage publish\n\nGitversion is buld for usage within CI/CD pipelines. When building packages gitversion can be used in a pipeline like this:\n\n![Pipeline](./assets/pipeline.png)\n\nThis will allow you to run your time consuming steps in parallel with your build step. Only when all checks pass you have a (quick) publish stage.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwpkg%2Fgitversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwpkg%2Fgitversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwpkg%2Fgitversion/lists"}