I made a commit, pulled and merged some changes, and then made a second commit. When I wanted to go back to the first commit, I ran the command
git reset --hard <sha hash>
While the response was "HEAD is now at <sha hash>", my code looks just as it did before I ran that command. Usually, it changes to what I had before, but it looks like something isn't working correctly. Do I need to run a different command to unmerge before resetting head?
Extra info
When I run git status it says:
app/assets/images/.DS_Store.orig is untracked
and I can add it.
According to git reflog, I pulled before I made the commit hash1 (which I consider "before merge"). There is an sha hash2 for the pull (which git log did not show). When I dig hash1 and hash2, I see the changes I made and could reconstruct my original code from this. Still, this seems very strange. If I try to git reset to either of them, I cannot get my code from before the merge.
git statussay there are changes to be committed? What are they?git reflogmight help), then usegit diff [hash1] [hash2]to see the difference between them. Then try usinggit checkout [hash1]andgit checkout [hash2]to see if your working directly changes appropriately.