-
Notifications
You must be signed in to change notification settings - Fork 0
Reference: git flow bugfix
Lists all the existing bugfix branches in the local repository.
git flow bugfix [list] [-h] [-v]
-h,--[no]help show this help
-v,--[no]verbose verbose (more) output
Start new bugfix <name>, optionally basing it on <base> instead of <develop>
git flow bugfix start [-h] [-F] <name> [<base>]
-h,--[no]help show this help
--showcommands
Show git commands while executing them
-F,--[no]fetch
fetch from origin before performing local operation
Finish bugfix <name>
git flow bugfix finish [-h] [-F] [-r] [-p] [-k] [-D] [-S] [--no-ff] <name|nameprefix>
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
-F,--[no]fetch
fetch from origin before performing finish
-r,--[no]rebase
rebase before merging
-p,--[no]preserve-merges
preserve merges while rebasing
-k,--[no]keep
keep branch after performing finish
--[no]keepremote
keep the remote branch
--[no]keeplocal
keep the local branch
-D,--[no]force_delete
force delete bugfix branch after finish
-S,--[no]squash
squash bugfix during merge
--no-ff
never fast-forward during the merge
If you merged your bugfix branch on GitHub/GitLab (e.g., via the web UI after git flow bugfix propose), finish will detect this automatically:
- If the remote branch is deleted but changes are already merged into the base branch
- The command will simply clean up the local branch
- No merge is performed (since the changes are already in the base branch)
This allows you to use propose to create a PR, merge it on GitHub/GitLab, and then run finish to clean up your local branch.
Publish bugfix branch <name> on $ORIGIN
git flow bugfix publish [-h] <name>
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
Start tracking bugfix <name> that is shared on $ORIGIN
git flow bugfix track [-h] <name>
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
Show all changes in <name> that are not in <develop>
git flow bugfix diff [-h] [<name|nameprefix>]
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
Rebase <name> on <base_branch>
git flow bugfix rebase [-h] [-i] [-p] [<name|nameprefix>]
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
-i,--[no]interactive
do an interactive rebase
-p, --[no]preserve-merges
preserve merges
Switch to bugfix branch <name>
git flow bugfix checkout [-h] [<name|nameprefix>]
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
Pull bugfix <name> from <remote>
git flow bugfix pull [-h] <remote> [<name>]
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
Deletes a given bugfix branch
git flow bugfix delete [-h] [-f] [-r] <name>
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
-f,--[no]force
force deletion
-r,--[no]remote
delete remote branch
Rename branch <name> to <new_name>
git flow bugfix rename [-h] <new_name> [<name>]
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
Synchronize bugfix branch <name> with the base branch. This command fetches updates from origin, updates the base branch (develop), and rebases or merges your bugfix branch on top of it. Optionally prunes stale branches. Inspired by git-town sync.
git flow bugfix sync [-h] [--prune] [<name|nameprefix>]
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
--prune
After syncing, prune local branches whose tracking remote branches no longer exist (e.g., branches merged via GitHub PR)
- Stashes any uncommitted changes
- Fetches updates from origin (with --prune to clean up deleted remote refs)
- Updates the base branch (e.g., develop) with remote changes
- Rebases or merges your bugfix branch (based on
syncstrategyconfig) - Optionally pushes your branch to origin
- If
--pruneis specified, prompts to delete stale local branches (branches whose remote tracking branch is gone) - Restores stashed changes
When using --prune, the command will:
- Skip branches that have unpushed commits (local changes not on remote)
- Prompt for confirmation before deleting each stale branch
- Show which branches are being skipped due to local changes
-
gitflow.syncstrategy- Set torebase(default) ormerge -
gitflow.sync.prune- Set totrueto enable prune by default
Alias: git flow bugfix pr
Publish bugfix branch and create a pull/merge request. Uses GitHub CLI (gh) or GitLab CLI (glab) if available, otherwise opens the PR creation URL in your browser.
git flow bugfix propose [-h] [-d] [-a <user>] [-R <user>] [-l <label>] [<name|nameprefix>]
git flow bugfix pr [-h] [-d] [-a <user>] [-R <user>] [-l <label>] [<name|nameprefix>]
-h,--[no]help
show this help
--showcommands
Show git commands while executing them
-d,--[no]draft
Create the pull request as a draft
-a,--assignee <user>
Assign users to the pull request (comma-separated for multiple)
-R,--reviewer <user>
Request reviews from users (comma-separated for multiple)
-l,--label <label>
Add labels to the pull request (comma-separated for multiple)
- Publishes the bugfix branch to origin (if not already published)
- Detects the forge type (GitHub, GitLab, Bitbucket)
- Creates a PR using CLI tools if available:
- GitHub: uses
gh pr create - GitLab: uses
glab mr create
- GitHub: uses
- Falls back to opening PR creation URL in browser if no CLI is available
- For Bitbucket, always opens the browser URL
-
gitflow.proposeopen- Set totrue(default) orfalseto control browser auto-open -
gitflow.finishmode- Set toproposeto use propose instead of finish by default -
gitflow.bugfix.propose.draft- Set totrueto create draft PRs by default -
gitflow.bugfix.propose.assignee- Default assignee(s) for PRs -
gitflow.bugfix.propose.reviewer- Default reviewer(s) for PRs -
gitflow.bugfix.propose.labels- Default label(s) for PRs -
gitflow.bugfix.propose.autolabel- Set totrueto auto-add "bugfix" label