IntelliJ and Git Branch Name

2020-05-18 04:20发布

I've recently moved from Eclipse to IntelliJ. A challenge as I'm a keyboard shortcut junkie, but that isn't what I'm here about.

I miss having the git branch name shown in the package/project view.

Does anyone know of a way to configure IntelliJ to display what git branch the project is in, so I don't have to keep switching back to the terminal and checking.

Thanks.

10条回答
对你真心纯属浪费
2楼-- · 2020-05-18 05:03

Coming from Eclipse, I was used to that, so I created a plugin for this:

https://plugins.jetbrains.com/plugin/7802?pr=idea

查看更多
smile是对你的礼貌
3楼-- · 2020-05-18 05:07

Just install GitToolBox plugin.

Side note
The default behavior is to show the file full-path and it will be hard to see the branch names since they're pushed all the way to the right. To solve that you can:

  • Go to File > Settings > Other Settings > GitToolBoxGlobal > Project View and arrange the ordering of the variables in the left pane. E.g. I use the following order: {status} {branch} {tags on head} {location}; this will display something like 3↑ 2↓ master 1.0.0 /path/to/location
  • Or install PathHide plugin to get rid the module path if you don't need it.
查看更多
混吃等死
4楼-- · 2020-05-18 05:08

Install IntelliJ Plugin "GitToolBox"

enter image description here

查看更多
Explosion°爆炸
5楼-- · 2020-05-18 05:09

This is a late answer, if someone is looking for a way to see current git branch in intelliJ.

  1. Install gitbar plugin Git Bar Plugin Repo

enter image description here

  1. Enable status bar and look at the bottom right corner , which shows your current branch as well as you can switch branches from there.

enter image description here

查看更多
登录 后发表回答