When I generate a stash in git
, there is a "parent" (the last commit before I stashed my changes).
When I use git stash
to stash my changes, an ID to that parent-commit is added to the message describing my stash. calling git stash list
can e.g. show:
stash@{0}: WIP on master: c09a3fc second commit
stash@{1}: WIP on master: 063b893 first commit
stash@{2}: WIP on master: 063b893 first commit
But when I run git stash save "My own message"
the ID of the parent-commit is not added (git stash list
):
stash@{0}: On master: My own message
stash@{1}: WIP on master: c09a3fc second commit
stash@{2}: WIP on master: 063b893 first commit
stash@{3}: WIP on master: 063b893 first commit
It there a way to show the ID of the parent-commit to the list of stashes?
I tried: git stash list --oneline --parents
, which gave me:
1b5dfb1 4efd3e0 refs/stash@{0}: On master: My own message
4efd3e0 1e9b384 refs/stash@{1}: WIP on master: c09a3fc second commit
1e9b384 51eb834 refs/stash@{2}: WIP on master: 063b893 first commit
51eb834 refs/stash@{3}: WIP on master: 063b893 first commit
But here the wrong IDs are shown. I expected (the first line beeing the ID of the parent-commit which is the same for groups of two commits in this example):
c09a3fc 1b5dfb1 refs/stash@{0}: On master: My own message
c09a3fc 4efd3e0 refs/stash@{1}: WIP on master: c09a3fc second commit
063b893 1e9b384 refs/stash@{2}: WIP on master: 063b893 first commit
063b893 51eb834 refs/stash@{3}: WIP on master: 063b893 first commit