Add the changes to the staging area which you do not want to stash. All changes to be stashed should be not staged but modified or untracked. Then you can just git stash --keep-index to stash changes. As mentioned in some other answer, add -u to add untracked files also. Then you can just git restore --staged <file names> to bring staged changes back to modified.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
git stash --keep-index
it is.Add the changes to the staging area which you do not want to stash. All changes to be stashed should be not staged but modified or untracked. Then you can just
git stash --keep-index
to stash changes. As mentioned in some other answer, add-u
to add untracked files also. Then you can justgit restore --staged <file names>
to bring staged changes back to modified.