I had a master branch with unstaged/uncommitted changes. These are the commands I ran.
git branch dev
git checkout master
git checkout .
git pull
git checkout dev
git fetch origin
git merge origin/master
All my changes have disappeared from the files in dev. I never got a conflict warning when merging with master. My commit history on both branches look exactly the same. I've tried git reflog to no avail.
hash6 HEAD@{0}: reset: moving to HEAD@{8}
hash1 HEAD@{1}: reset: moving to HEAD@{8}
hash2 HEAD@{2}: reset: moving to HEAD@{8}
hash1 HEAD@{3}: reset: moving to HEAD@{10}
hash3 HEAD@{4}: reset: moving to HEAD@{10}
hash5 HEAD@{5}: reset: moving to HEAD@{10}
hash4 HEAD@{6}: reset: moving to HEAD@{10}
hash2 HEAD@{7}: checkout: moving from master to dev
hash2 HEAD@{8}: checkout: moving from dev to master
hash2 HEAD@{9}: merge origin/master: Fast-forward
hash1 HEAD@{10}: checkout: moving from master to dev
hash2 HEAD@{11}: commit: commit-message
hash1 HEAD@{12}: checkout: moving from dev to master
hash1 HEAD@{13}: checkout: moving from master to dev
hash1 HEAD@{14}: pull: Fast-forward
hash3 HEAD@{15}: pull: Fast-forward
hash5 HEAD@{16}: reset: moving to origin/master
hash4 HEAD@{17}: clone: from git@github.com:my/my-repo
Is there any way to recover those uncommitted changes? I feel like they shouldn't have just disappeared without any warning, but I can't find them anywhere.