Git see what39s in a stash without applying stash

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

Possible Duplicate:
http://stackoverflow.com/questions/3573623/is-it-possible-to-preview-stash-appplication-in-git http://stackoverflow.com/questions/3573623/is-it-possible-to-preview-stash-appplication-in-git


http://git-scm.com/book/en/Git-Tools-Stashing http://git-scm.com/book/en/Git-Tools-Stashing

Answers

From the man git-stash page:

The modifications stashed away by this command can be listed with git stash list, inspected with git stash show
show [<stash>]
       Show the changes recorded in the stash as a diff between the stashed state and
       its original parent. When no <stash> is given, shows the latest one. By default,
       the command shows the diffstat, but it will accept any format known to git diff
       (e.g., git stash show -p stash@{1} to view the second most recent stash in patch
       form).

So, to view the content of the most recent stash, run

git stash show -p

To view the content of an arbitrary stash, run something like

git stash show -p stash@{1}

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/10725729/git-see-whats-in-a-stash-without-applying-stash

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils