やってはいけないことをしてしまったのだと思います。私は stash を使おうとしましたが、分岐してそこでやるべきだと思いました。とにかく、これらは私がしたコマンドです:
git branch test # created my test branch
git checkout test # moved to my test branch
git status # showed that the files were still changed.
git stash # testing stash
git stash list # showed that the stash was there
git status # showed that the files were still changed?
git diff # showed that the differences were only file permissions.
git stash apply # Tried to get back my changes. States:
# error: Your local changes to the following files would be overwritten by merge:
# ...
# Please, commit your changes or stash them before you can merge.
# Aborting
git commit file -m "- committing test code that doesn't work."
git status # Shows that it's clean
だから、問題は、分岐とチェックアウトが私の変更を保存するのではなく消去したことだと考えています。あれは正しいですか?そうでない場合、変更を元に戻すことはできますか?