git-flow:tldr:7f9a1
The git flow init
command is used to initialize git flow in a Git repository. Git flow is a branching model for Git that provides a set of standardized branch naming conventions and workflow guidelines. It is designed to simplify the collaboration and management of feature development, releases, and hotfixes within a Git repository.
When the git flow init
command is executed in a Git repository, it performs the following tasks:
- It checks if the repository already has git flow initialized. If git flow is already initialized, it displays an error message and aborts.
- It prompts the user to specify the branch prefixes for features, releases, hotfixes, and support branches. The default prefixes are
feature/
,release/
,hotfix/
, andsupport/
respectively. - It prompts the user to specify the name of the branch used for "production releases". The default name for this branch is
master
. - It prompts the user to specify the name of the branch used for "next release development". The default name for this branch is
develop
. - It initializes git flow by creating the necessary branches and initializing the git flow configuration files.
Once git flow is initialized, you can start using git flow commands like git flow feature start
, git flow release start
, git flow hotfix start
, etc., to create and manage branches following the git flow workflow.
It is important to note that the git flow
command line tool must be installed and configured on your system for the git flow init
command to work.