← 返回命令列表

Linux command

git-flow 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize git flow

git flow init

Initialize with default branch names

git flow init -d

Start feature branch

git flow feature start [feature-name]

Finish feature

git flow feature finish [feature-name]

Start release

git flow release start [version]

Finish release

git flow release finish [version]

Publish a feature branch to remote

git flow feature publish [feature-name]

Start a hotfix

git flow hotfix start [version]

Finish a hotfix

git flow hotfix finish [version]

说明

git flow implements Vincent Driessen's branching model, providing high-level commands for managing feature, release, and hotfix branches with consistent naming and merge strategies. The workflow uses develop as the integration branch and main/master for releases. Features branch from develop, releases prepare for production, and hotfixes go directly to main. This standardizes team branching workflows with clear conventions.

参数

init
Initialize repository for git-flow.
feature _ACTION_ _NAME_
Manage feature branches.
release _ACTION_ _VERSION_
Manage release branches.
hotfix _ACTION_ _NAME_
Manage hotfix branches.
support _ACTION_ _NAME_
Manage support branches.
start
Begin a new branch.
finish
Complete and merge branch.
publish
Push branch to the remote repository.
track
Track a remote branch locally.
pull
Pull a remote branch (deprecated in favor of track).
delete
Delete a finished branch.
list
List existing branches of a given type.
-d
Use default branch naming conventions during init.
--help
Display help information.

FAQ

What is the git-flow command used for?

git flow implements Vincent Driessen's branching model, providing high-level commands for managing feature, release, and hotfix branches with consistent naming and merge strategies. The workflow uses develop as the integration branch and main/master for releases. Features branch from develop, releases prepare for production, and hotfixes go directly to main. This standardizes team branching workflows with clear conventions.

How do I run a basic git-flow example?

Run `git flow init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does init do in git-flow?

Initialize repository for git-flow.