The Problem
We had an external developer working on a project on a wrong branch through FTP (not working with git at all).
The fix
To reapply his (by nature, uncommitted) changes, I ran git stash
, followed by git checkout [correct_branch]
, then git stash apply
. Nothing had changed except for a single file which was not changed by him (but existed in the stash anyway).
The good ol' weirdness
Running git diff 'stash@{0}' [correct_branch] --name-only
(alternatively omitting the name-only
flag) shows me a correct difflist of the changed files. When running git stash apply
or git stash apply 'stash@{0}'
, followed by git diff
does not tell me that anything has changed.
What's going on here? The diff
against the stash tells me that there is indeed changes in that stash that hasn't been applied to the current branch.