Skip to content

Instantly share code, notes, and snippets.

@DCRichards
Created August 30, 2016 21:23
Show Gist options
  • Save DCRichards/40709ccdf9e18543e7efa11c30315c21 to your computer and use it in GitHub Desktop.
Save DCRichards/40709ccdf9e18543e7efa11c30315c21 to your computer and use it in GitHub Desktop.
Create a git branch from a GitHub issue
javascript: (function(){var e=prompt("Enter the prefix for your branch (eg. bug, feature)","feature")||"feature",t=document.getElementsByClassName("js-issue-title")[0].innerText||"my-new-feature";t=t.replace(/\s/g,"-"),t=t.replace(/[^a-zA-Z0-9-]/g,""),t=t.toLowerCase();var r=e+"/"+t;alert("git push origin dev:"+r+" && git checkout -t origin/"+r)}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment