I have a git repository. When I do 'git branch', it said
$ git branch
* com-2.1-SS
and then I do 'git log', i get a list of my commit
$ git log
commit ff878926b78614e8bf6af161da06070618e9ff6b
commit 3ffda8cec60a74a718fb25fb7a9fe4b3c4381137
commit bf6bb3427d8031d8e172c3b8b7909c8580e929cd
So I want to check out my repository to 3ffda8cec. So I did 'git checkout 3ffda8cec'.
So far so good. It works and I get want I want.
But my question is how can I get back to com-2.1-SS? i.e. reverse the fact that I 'git checkout 3ffda8cec'
When I do 'git branch', it said
$ git branch
* (no branch)
When I do 'git checkout git checkout com-2.1-SS
error: pathspec 'com-2.1-SS' did not match any file(s) known to git.
com-2.1-SS
) but your second git output says you have no branches at all but nothing you've said you've done should have wiped out your branches. The command that should work isgit checkout com-2.1-SS
, notgit checkout git checkout com-2.1-SS1
.git branch
you removed the branch namedcom-2.1-SS
(if you have used only git commands, you probably have usedgit branch -D com-1.2-ss
) this is the most sensible explanation for your error.