Jira: assign an existing git branch to an issue

前端 未结 7 1166
别跟我提以往
别跟我提以往 2021-02-03 18:45

In JIRA connected with STASH you can create a feature branch for an issue using the button \'create branch\'. (That is nice to track the commits in this issue.)

If a dev

7条回答
  •  时光说笑
    2021-02-03 19:17

    Update

    As for january 2017 if you have an already exiting branch and you want to attach it to a Jira Issue you can do the following:

    1. Checkout to the branch you want to rename
    2. Execute the following command

      git branch -m JIRA_ISSUE_ID-Whatever

    Assuming that mine Jira issue is SO-01 I can do the following:

    git branch -m SO-01-Whatever
    

    This will change the name locally, push it to remote with:

    git push origin :old_name
    

    Command Syntax

    git branch (-m | -M) [] 
    

    Related question for more info

提交回复
热议问题