Reputation: 20015
There are plenty of things you can do with Git plugin for IntelliJ IDEA, but I haven't found a way to rename a branch. Is there one?
I know I can always bring up a terminal and do git branch -m source target
, but I expected to find a GUI solution as well.
Upvotes: 12
Views: 12106
Reputation: 645
VCS > Git > Branches...
Click on the right arrow of your project (look at Repositories).
The sub-window with branches will appear. Click on the right arrow of the branch you want to rename.
If you want to rename a branch you currently on. You have to checkout to another branch and then to find your branch in a way described above and rename it.
Upvotes: 5
Reputation: 1324737
There are a couple of pending issues with this feature:
The latter is not yet implemented.
The former does show the only way (mentioned by the OP) currently available:
Go to the command line and execute
git branch -m <old_name> <new_name>
But even that has refresh issue on IDEA.
Update January 2017: IDEA-131021 might have been implemented, as illustrated by Pavlo Zvarych's answer. It is consistent with the proposal:
introduce menu item in
Git | Branches
popup for current branch and place the actions related to the current branch in its second-level submenu.
Upvotes: 14