Is it possible to preview stash contents in git?

后端 未结 16 1754
后悔当初
后悔当初 2020-12-02 03:34

I often put work away for later, then other stuff comes along, and a few weeks later, I want to inspect the stash, and find out what changes it would make if I applied it to

16条回答
  •  佛祖请我去吃肉
    2020-12-02 03:58

    git stash show will show you the files that changed in your most recent stash. You can add the -p option to show the diff.

    git stash show -p
    

    If the stash you are interested in is not the most recent one, then add the name of the stash to the end of the command:

    git stash show -p stash@{2}
    

提交回复
热议问题