sindresorhus/refined-github

Rename a branch on the github.com web UI #2500

staabm posted onGitHub

when working on github we get all kind of automation which creates branches and works on our repo.

since I dont own most of this automation I have no influence on the naming of the branches.

e.g. Dependabot creates branch names like dependabot-npm_and_yarn-simplebar-5.0.3 which contains . characters, which are a problem for our further processing.

would it be possible to add a feature to refined github, so we will be able to rename a branch on github.com directly, without the need of a clone/fork and the git cli commands etc...?


Please also send this feature request to GitHub: support@github.com

posted by sindresorhus over 5 years ago

Done

posted by staabm over 5 years ago

This is already possible on GitHub, however it requires several steps:

  1. Visit branch

  2. Create branch from the branch selector:

    <img width="435" alt="branch selector" src="https://user-images.githubusercontent.com/1402241/73346676-df89ff00-42b8-11ea-8a70-cbae09c54100.png">

  3. Visit "Branches" page again

  4. Delete the previous branch

PR welcome to add a button next to delete:

  1. ask for name via window.prompt()
  2. call API to create a branch
  3. "click" delete button
  4. Trigger UI update
posted by fregante about 5 years ago

Renaming isn’t a safe operation, any PRs open on that branch will be disconnected, not transferred as one would expect.

I’d prefer #2895 instead. One more click (“Delete”), but less broken expectations.

posted by fregante about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests