On Tue, Jan 07, 2020 at 04:28:24PM +0100, Torsten Krah wrote: > I can reproduce that (locally) at least: > > What does *not* work for me: > > git clone XX main > cd main > git fetch XX && git checkout FETCH_HEAD > git checkout -b TEST > git reset --soft HEAD~1 > git restore --staged $FILES > > git status now lists $FILES as unstaged and they are not included in > the staging area. > > git commit > > -> now $FILES are included in the commit (I would expect them not to be > included - right?) and git status does list those still in the working > area. That step seems wrong, and I can't reproduce it here. If "git status" lists the files as unstaged, then "git commit" should not be committing them. Can you show us a more complete example that we can run ourselves (i.e., that does not rely on whatever is in "main", and what is in $FILES)? Barring that, can you show us the output of the commands, as well as "git show FETCH_HEAD FETCH_HEAD~1"? -Peff