{"id":16684138,"url":"https://github.com/kasuken/git-flow-cheatsheet","last_synced_at":"2025-04-09T23:32:32.334Z","repository":{"id":194503197,"uuid":"690968790","full_name":"kasuken/git-flow-cheatsheet","owner":"kasuken","description":"yet another GitFlow cheatsheet.","archived":false,"fork":false,"pushed_at":"2023-09-15T05:43:41.000Z","size":11,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T05:42:01.592Z","etag":null,"topics":["git","gitflow"],"latest_commit_sha":null,"homepage":"","language":null,"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/kasuken.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}},"created_at":"2023-09-13T08:42:17.000Z","updated_at":"2023-12-08T20:05:19.000Z","dependencies_parsed_at":"2023-09-13T17:29:07.178Z","dependency_job_id":null,"html_url":"https://github.com/kasuken/git-flow-cheatsheet","commit_stats":null,"previous_names":["kasuken/git-flow-cheatsheet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasuken%2Fgit-flow-cheatsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasuken%2Fgit-flow-cheatsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasuken%2Fgit-flow-cheatsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasuken%2Fgit-flow-cheatsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kasuken","download_url":"https://codeload.github.com/kasuken/git-flow-cheatsheet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248129545,"owners_count":21052590,"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","gitflow"],"created_at":"2024-10-12T14:28:24.596Z","updated_at":"2025-04-09T23:32:32.297Z","avatar_url":"https://github.com/kasuken.png","language":null,"readme":"# GitFlow Cheatsheet\n\n![GitFlow Diagram](https://github.com/kasuken/git-flow-cheatsheet/assets/2757486/1619a970-a259-45bd-82a1-3d3c6626a393)\nimage by Atlassian\n\n## Overview\n\nGitFlow is a workflow that defines a strict branching structure and a set of rules for merging changes between branches. It is based on two main branches: master and develop.\n\n- **master**: This branch contains the production-ready code. It is updated only when a new release is ready to be deployed.\n- **develop**: This branch contains the latest features and bug fixes that are being worked on. It is updated regularly by merging feature branches into it.\n\nIn addition to these two main branches, GitFlow uses four types of supporting branches: feature, release, hotfix, and support.\n\n- **feature**: These branches are created from develop and merged back into develop when a feature is completed. They are used to implement new functionality or enhancements. They have names like feature/xxx, where xxx is a descriptive name of the feature.\n- **release**: These branches are created from develop and merged into master and develop when a release is ready to be deployed. They are used to prepare the code for production, such as fixing bugs, updating documentation, and changing configuration. They have names like release/x.y.z, where x.y.z is the version number of the release.\n- **hotfix**: These branches are created from master and merged into master and develop when a critical bug needs to be fixed in production. They are used to patch the code without affecting the ongoing development. They have names like hotfix/x.y.z, where x.y.z is the version number of the hotfix.\n\n## Commands\n\nThe following commands are examples of how to use GitFlow. You can also use a graphical tool or a plugin to manage GitFlow.\n\n### Initialize GitFlow\n\nTo start using GitFlow, you need to initialize it in your repository. This will create the master and develop branches and set some configuration options.\n\n```bash\ngit flow init\n```\n\nYou can use the `-d` option to accept the default branch names.\n\n### Start a feature branch\n\nTo start working on a new feature, you need to create a feature branch from develop.\n\n```bash\ngit flow feature start \u003cname\u003e\n```\n\nThis will create a branch called feature/name and switch to it.\n\n### Finish a feature branch\n\nWhen you are done with your feature, you need to merge it back into develop and delete the feature branch.\n\n```bash\ngit flow feature finish \u003cname\u003e\n```\n\nThis will merge feature/name into develop, switch to develop, and delete feature/name.\n\n### Start a release branch\n\nWhen you are ready to prepare a new release, you need to create a release branch from develop.\n\n```bash\ngit flow release start \u003cversion\u003e\n```\n\nThis will create a branch called release/version and switch to it.\n\n### Finish a release branch\n\nWhen you have finished testing and fixing your release, you need to merge it into master and develop and tag it with the version number.\n\n```bash\ngit flow release finish \u003cversion\u003e\n```\n\nThis will merge release/version into master and develop, switch to master, tag it with \u003cversion\u003e, switch back to develop, and delete release/version.\n\n**Important**: if you want to tag the release directly from the command, add the parameter -m at the end of the command.\n\n```bash\ngit flow release finish \u003cversion\u003e -m \u003cyourtag\u003e\n```\n\n### Start a hotfix branch\n\nWhen you need to fix a critical bug in production, you need to create a hotfix branch from master.\n\n```bash\ngit flow hotfix start \u003cversion\u003e\n```\n\nThis will create a branch called hotfix/version and switch to it.\n\n### Finish a hotfix branch\n\nWhen you have fixed the bug, you need to merge it into master and develop and tag it with the version number.\n\n```bash\ngit flow hotfix finish \u003cversion\u003e\n```\n\nThis will merge hotfix/version into master and develop, switch to master, tag it with \u003cversion\u003e, switch back to develop, and delete hotfix/version.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasuken%2Fgit-flow-cheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkasuken%2Fgit-flow-cheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasuken%2Fgit-flow-cheatsheet/lists"}