Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Diff against stash in PyCharm

PyCharm allows a user to diff any two files in the project, or to diff any file with previous Git commits. Is there a way to diff a file with its version in the stash?

Of course, this is possible from the command line with Git, but I would like to do it with IntelliJ's graphical editor.

like image 608
Josiah Yoder Avatar asked Mar 04 '23 10:03

Josiah Yoder


1 Answers

In IntelliJ you can call VCS - Git - Unstash, select the stash you want to see and click View. This will list all files modified by the stash. From there you can invoke individual diffs

Note that diffs opened this way will show you the actual diff between the stashed version and your local code (equivalent of git diff stash@{0}) while git stash show -p suggested in the mentioned thread shows only the stashed patch.

like image 110
Dmitriy Smirnov Avatar answered Mar 10 '23 10:03

Dmitriy Smirnov