When I try to pop/apply a simple stash with --index that includes files from the index/staging area, I get the following output:
$ git stash apply --index
error: No valid patches in input (allow with "--allow-empty")
error: conflicts in index. Try without --index.
This only happens on my machine (git version 2.43.0, arch linux+zsh). I cannot reproduce it on another machine.
I tried disabling autocrlf, but it does not solve the problem.
This does not happen if I omit --index.
stashwith a history viewer (for examplegitk stash, or rungit log --oneline --graph stashand see what commits should be compared) to figure out what patches should be applied ; b. perhaps the index part is already part of the committed changes on your new HEAD, have you tried runninggit stash apply(without--index) as suggested ?--indexwhich I am trying to use. I will update the question. I can't find something useful or related usinggit logorgitk