I lost my code after switching to another branch (thought that I pushed it, but head was detached)
I switched from master to origin/somebranch Did some work there Then I had to quickly fix something in master, so I did git add -A git commit -m "some commit" git push git checkout master
I did it pretty fast, so I didn't read the message about head being detached... So a result when I switched back to somebranch, my changes were not there... Are my changes lost or there is a way to restore it?