You're in a detached state. This means there's no tag (such as "master") pointing to the commit you're on, you're somewhere back in history. Did you run something like "git checkout <hash>"?
Usually, in order to get back to where you were before you checked out some other commit, you would type:
In this case, you would be returning to the front of the branch "master", the default branch,
without taking any of the committed changes you made with you. Note that this may fail if you have modified files - in this case you either have to discard the changes you made, or continue reading.
If you've modified files or made a few commits and want to keep the changes you made, you'll have to merge those changes into master (or whatever branch you branched off from) with:
(add and commit your stuff)
(copy the hash you see on the right side of your terminal)
$ git checkout master # ignore the warnings you get about leaving unconnected branches behind
$ git merge <hash> # paste the hash code here
Read this to understand how branches work:
http://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
It's really quite elegant and easy to understand.
I also urge you to read the manual:
http://git-scm.com/doc
Quote: "I use SourceTree with BitBucket. Command line interfaces may make you feel manly, but you can waste time that is best spent on your actual project, rather than the management of it."
GUI front-ends are good as an introduction to git, but once you understand the basics, it's better to use the command line. You're faster and you have more control.
Need help with C/C++ game dev? PM me or add me on skype: the__comet.
Current active project:
Light Ship