Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create new branch from the Issue

Tags:

Is it possible to create new branch directly from Issue which is posted on Github? We have project hosted on Github with many issues, it would be easy for us just to click one button in Issue web interface and create new branch for it to start developing.

like image 394
Tomas Avatar asked Jan 12 '17 13:01

Tomas


People also ask

How do you create a new branch for an issue in GitLab?

go in the issue, find the "Create branch" button and click on the little arrow to expand the details. In the "Source (branch or tag)" Field, your default branch (Master in our example) will be pre-selected. Change that entry to UAT (you'll have to type it in since there's no dropdown menu). click on Create branch.

What is create new branch from?

New Branches The git branch command can be used to create a new branch. When you want to start a new feature, you create a new branch off main using git branch new_branch . Once created you can then use git checkout new_branch to switch to that branch.

How do I create a branch from a specific commit?

First, checkout the branch that you want to take the specific commit to make a new branch. Then look at the toolbar, select Repository > Branch ... the shortcut is Command + Shift + B. And select the specific commit you want to take. And give a new branch name then create a branch!

How do I create a new branch in git branch?

Now choose your child branch as from branch and enter the name of your new branch. -> GrandChildBranch and so on. You can create any new branch from any existing branch, tag, commit, etc. Hope it will help.


2 Answers

This is not possible directly from the issue interface. I can try to provide you some workarounds and maybe start a debate why one would want this feature:

Creating branches directly on the web interface

After you've noticed that you need to start working on an issue you can just go to the repository main page (keyboard shortcut gc) and create a branch with the name you want:

enter image description here

Chrome extensions

If this is a must for you, you can create a chrome extension that augments the UI and creates a branch directly from the Issues WebUI using the GitHub API. There's a lot of open source extensions that augment the default WebUI.

Is it the most efficient way to start a new feature?

I think this changes from developer to developer, but having worked with GitHub for 7 years using Issues I've never felt the need for this feature because unless it's a one line change that doesn't require local testing or compilation, I still want to get down to my command line and IDE. If I have to do that, I still have to at least git fetch to get the branch I just created directly through the issue interface. If that's the case I've always preferred to just look at the issue and run git checkout -b branch-name, optionally with git push if my team needs to see the branch.

Then the issue name wouldn't normally translate to a branch name, at least I wouldn't want that. So that option to create a branch from an issue would probably need to spin out a prompt to allow me to name the branch what I wanted.

This is just my personal opinion and nothing else, hope it helps :)

like image 97
bitoiu Avatar answered Oct 31 '22 19:10

bitoiu


https://github.com/isaacs/github/issues/1125

Nope. You can subscribe this issue.

like image 33
chris Avatar answered Oct 31 '22 17:10

chris