Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8764105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:56:50+00:00 2026-06-13T15:56:50+00:00

git flow only allows one hotfix branch at any one time. So rather than

  • 0

git flow only allows one hotfix branch at any one time. So rather than typing:

git flow hotfix finish hotfix_branch

I’dl like to create an alias that uses the only existing hotfix branch name. Something like the following pseudocode:

[alias]
  fix-done = flow hotfix finish `git_fetch_branch_beginning_with_hotfix`

Can anyone help? Thanks.

Update: I’m using zsh.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:56:51+00:00Added an answer on June 13, 2026 at 3:56 pm

    This function is more or less extracted from git-flow‘s source code:

    finish_current_hotfix_branch ()
    {
      local hotfix_prefix=$(git config --get gitflow.prefix.hotfix)
      local hotfix_branches=$(echo "$(git branch --no-color | sed 's/^[* ] //')" | grep "^$hotfix_prefix")
      local first_branch=$(echo ${hotfix_branches} | head -n1)
      first_branch=${first_branch#$hotfix_prefix}
      git flow hotfix finish "$first_branch"
    }
    

    Update

    It seems like you have to put the entire function in your alias. Not nice, but works:

    [alias]
      fix-done ="!_() { p=$(git config --get gitflow.prefix.hotfix); b=$(echo \"$(git branch --no-color | sed 's/^[* ] //')\" | grep \"^$p\"); f=$(echo ${b} | head -n1); f=${f#$p}; git flow hotfix finish \"$f\"; }; _"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

git status tells me that my branch and the one I started from on
I've been using Git Flow to help manage branch and workflow. I love how
I'm using git flow, and without thinking, I've commited code to the wrong branch
I've started git flow and loved it for many reasons. However, one of our
Is there a way to clone only subset of the original branch in git?
I am learning git-flow and I just did git flow feature finish <feature-name> ,
Are there any GUI frontends for Git with git-flow support? Our team uses Eclipse
I'm using git-flow for my projects, and have started a rather complicated set of
I am using git along with git flow . Here git flow has a
I just tried to install git-flow, however, it does not seem to be integrated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.