How to delete a stash created with git stash create?

前端 未结 9 1018
失恋的感觉
失恋的感觉 2020-12-04 04:28

Git stash seems to do a lot of what I want, except that it is a little hard to script, as the if you have no changes, then git stash; git stash pop will do some

9条回答
  •  青春惊慌失措
    2020-12-04 05:01

    From git doc: http://git-scm.com/docs/git-stash

    drop [-q|--quiet] []

    Remove a single stashed state from the stash list. When no is given, it removes the latest one. i.e. stash@{0}, otherwise must be a valid stash log reference of the form stash@{}.

    example:

    git stash drop stash@{5}
    

    This would delete the stash entry 5. To see all the list of stashes:

    git stash list
    

提交回复
热议问题