0

I have a working directory (master) and then i made a branch lets call it skrollr. I believe I was working in skrollr and making changes and commits. when i was in skrollr I dig git branch and i saw the star by skrollr so now I knew that the branch existed and i was working in it. I committed all then did checkout master, got back to the master working directory than checked out the skroller branch by git checkout skrollrit says that im in skrollr. but I don't see the commits I was working on before I switched to master. when i do git log it shows the commits it shows the commits form master but not from skrollr. I want to go to the working directory of skrollr.

Edit when i do git branch -v it shows the last commit from both branches are the last commit I made in master

jack blank
  • 5,073
  • 7
  • 41
  • 73
  • do i have to do all the changes again? – jack blank Mar 24 '15 at 15:31
  • What's the output of `git reflog`? It shows the history of the commands that caused changes to HEAD (commits, checkouts, rebases, etc.). – jcm Mar 24 '15 at 15:54
  • I did what you said and i got my working directory back from doing `git checkout 9084e` i found 9084e from `git reflog` so that's good. I have to find out why i couldn't see my commits when i checked out branches. I see `* (detached from 9084e02)` when i do `git branch` – jack blank Mar 24 '15 at 16:45
  • The reflog should tell you what caused it. Maybe you checked-out a commit? See this [related question](http://stackoverflow.com/questions/3965676/why-did-my-git-repo-enter-a-detached-head-state). – jcm Mar 25 '15 at 02:15

0 Answers0