Accidentally when checking out the branch, I used --force to force switch to another branch (crying), causing the part of the code without add to be lost.
I tried to use git reflog to view the log and created a new tmp branch. It points to the HEAD@ before I moved it, but there is still no way (without add) to get it back. Does anyone have any way to get it back?
Note: I restarted my computer.
Remember to use it next time
git stash
It is common to lose code if you are not proficient in version control. You can check it in the IDE's history.
There is no way --force is dead.