最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

git - VSCode like file change viewer setting for intellij - Stack Overflow

programmeradmin1浏览0评论

I'm really fond of IntelliJ to do all programming stuff, however what I do feel it could derive from VS Code is the file change viewer (Left VS Code, IntelliJ right)

  • Vscode has clear has sections differentiating the staged/unstaged files, IntelliJ has color codes + sections which aren't clear
  • Clicking on the file in this section in VS Code brings the diff viewer, while in IntelliJ, you have to right-click -> git -> diff
  • Vscode has an easy side button to stage a file, while IntelliJ has right-click -> git -> add

So far, I've been using code for just viewing diffs before I commit, yet I'd like to not leave IntelliJ at all if I could get this exact customization in or use some plugins that give me this. (The diff viewer in IntelliJ is the best, however it's not very accessible like in code)

Is there any way to do this?

I'm really fond of IntelliJ to do all programming stuff, however what I do feel it could derive from VS Code is the file change viewer (Left VS Code, IntelliJ right)

  • Vscode has clear has sections differentiating the staged/unstaged files, IntelliJ has color codes + sections which aren't clear
  • Clicking on the file in this section in VS Code brings the diff viewer, while in IntelliJ, you have to right-click -> git -> diff
  • Vscode has an easy side button to stage a file, while IntelliJ has right-click -> git -> add

So far, I've been using code for just viewing diffs before I commit, yet I'd like to not leave IntelliJ at all if I could get this exact customization in or use some plugins that give me this. (The diff viewer in IntelliJ is the best, however it's not very accessible like in code)

Is there any way to do this?

Share Improve this question edited Feb 8 at 9:35 dani-vta 6,9207 gold badges49 silver badges65 bronze badges asked Feb 8 at 8:09 haxwagoreshaxwagores 255 bronze badges 2
  • 1 Seems unlikely that this is possible. It's also a matter of personal preference (and probably what you're used to). I prefer the IntelliJ view, but never put in the effort to get used to the VSC one. To respond to your three points: 1. To me, the colors are way more clear at a glance than the letters on the right, and the "moved from" is a big plus. 2. Double click. 3. IJ automatically adds new files to git that are not in the .gitignore, so you hardly ever have to add any unversioned files manually. When you use <kbd>Ctrl</kbd> + <kbd>K</kbd> it stages all the Changes as well. – Abby Commented Feb 8 at 8:50
  • any plugins that you may know of that may bring the vscode like interface? – haxwagores Commented 2 days ago
Add a comment  | 

1 Answer 1

Reset to default 1

I'm going to address each point one by one:

  1. Unfortunately, IntelliJ doesn't provide a view option to split changes into two groups (staged and unstaged files). At most, you can group files by directory or module by clicking on the eye icon above the changes list, but this is not what you're looking for.

  2. If you want to open the diff viewer on a file, just double-click on the file from the changes list. You don't need to do right-click > git > diff. Alternatively, you can set up a hotkey to show the differences for the current file. Just go to File > Settings > Keymap and either search for Compare with the Same Repository Version, or keep browsing to Version Control Systems > Git > Compare with the Same Repository Version. Then, assign a hotkey.

  3. If you need to stage a file, just check the checkbox on the left of the file from the changes list. You don't necessarily need to do right-click > git > add. Alternatively, you can use the hotkey CTRL + ALT + A to stage the current file, and even though it won't be shown as checked in the changes list, if you run git status you can see that the file is actually staged.

发布评论

评论列表(0)

  1. 暂无评论