IntelliJ show GIT differences after commit

99封情书 提交于 2020-01-11 14:16:51

问题


First, I create new branch. Then, I add a new code line in my class. Intellij shows on the left with a different color that I added a new line. Then, I commit my code. After this, IntelliJ no longer shows that I added new line on the left. I don't want that.

How can I configure IntelliJ so it would show all the changes that have been done, compared to, for example, another branch or commit from before?


回答1:


Unfortunately having diff markers in the editor with respect to some earlier commit is not possible right now in IDEA. Here's the ticket in JetBrain's issue tracker:

https://youtrack.jetbrains.com/issue/IDEA-24398

Please vote for it and comment on it.




回答2:


Changes with different color as you found only show the changes which are not committed. After you commit changes, there won’t show the new lines on the left (also as you found) since there is no changes need to be committed.

If you want to compare the changes which have already committed, you can select a commit and then show diff. Detail steps as below:

Version Control -> Log -> select a commit -> show Diff.

Then you will get the changes by compare with the previous commit.



来源:https://stackoverflow.com/questions/46056323/intellij-show-git-differences-after-commit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!