Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See full content of Stash in SourceTree

Is there a way in SourceTree to see the whole content of a stash?

I have stashed quite a bunch of changes that are not yet ready to be committed on the Develop branch in order to checkout the Master branch for a hotfix. Now I realize that one change in the stash would be good to include in the hotfix since I will anyway have to make a new deployment. But since the stash is largish, I cannot see the particular change I want when I select the stash in SourceTree. For me, SourceTree shows only a part of the stash as some kind of summary...

I know that I can get around this in several different ways, but if there is an option somewhere that I don't know of which would make SourceTree show the full contents of the stash, I'd be very pleased if someone could tell me where to find it.

The repository is a GIT repository if that makes a difference...

like image 855
user1429080 Avatar asked May 13 '16 11:05

user1429080


People also ask

How do I view content of stash?

The Git stash list command will pull up a list of your repository's stashes. Git will display all of your stashes and a corresponding stash index. Now, if you wish to view the contents of a specific stash, you can run the Git stash show command followed by stash@ and the desired index.

How can I see my stash changes without applying?

git stash show -p stash@{0} --name-only shows just the names of the files (not the contents) in your first stash. @mrgloom If you want to see the stashed changes for a single file, then something like git diff stash@{0}^! -- file. txt will do it.


2 Answers

Can be fixed (in latest version?) by increasing the Max File Count and Max Diff Line Count in the Tools > Options > Diff:

enter image description here

like image 160
huysentruitw Avatar answered Oct 05 '22 23:10

huysentruitw


For some reason I don't see the "Max File Count" field on SourceTree 4.0.1 (234) on macOS.

One ugly trick to see the whole stash is:

  1. Copy your project folder and open the folder with SourceTree.
  2. Discard all active changes.
  3. Apply your stash.
  4. Copy or check any code you might need.
like image 39
Sylven Avatar answered Oct 05 '22 22:10

Sylven