Use gitk, it is a good help, when beginning, to visualize what happens.
If you are a new git user, you can try git on try.github.io to be more familiar with git commands.
You can also have a look to Atlassian Git documentation.
Something is wrong, see undo in git page.