I had used the command git checkout -- $(git ls-files -m) to undo a git rm on some files. However, I had modified some other files without committing them, and these files have been reverted to their previous commit, losing the uncommitted changes.
Is there a way to get these changes back?
I imagine not with git as the changes weren't added to git. On a Mac if that helps.
Thanks Tom
git reflog. Might be helpful in your situation. It's like a list of restore points you can reset to. git-scm.com/docs/git-refloggit addof the modified contents, those are now stored in the repository and will show up as "dangling blob"s (usegit fsck --lost-foundto get file contents, but the names are gone). If not ... well, if Time Machine backed them up you might be able to get them from there. Otherwise they are probably gone.git checkout .and good bye pending work, in EACH file! :-o No warning, not a word. As if that could be the happiest possible result. (And the internet seems complicitly silent about this, just see how your question got zero answers. :) Or, worse: I've even seen reasoning for it, equivalent to sayingformat c:orrm -rshould not ask, as you deliberately issued the command... :) )