I checked out my previous git commit per https://stackoverflow.com/a/2007704/1032531. Note that it stated to include the .
. Am I hosed and should I have studied up more on this subject before doing this? How can I get back the changes I was in process of making before checking out this other branch?
[michael@devserver autoapp]$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: public/index.php
..and about 40 other files
Untracked files:
(use "git add <file>..." to include in what will be committed)
src/Lib/Helper.php
no changes added to commit (use "git add" and/or "git commit -a")
[michael@devserver autoapp]$ git log
commit 4037ec1702bd2fa6a5a15f7413f4ccccb59d356e (HEAD -> master)
Author: Michael Reed <michael@gmail.com>
... and lists the other commits but the one above was the latest one
[michael@devserver autoapp]$ git checkout 4037ec1702bd2fa6a5a15f7413f4ccccb59d356e .
[michael@devserver autoapp]$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
src/Lib/Helper.php
nothing added to commit but untracked files present (use "git add" to track)
[michael@devserver autoapp]$ git checkout master
Already on 'master'
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
[michael@devserver autoapp]$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
src/Lib/Helper.php
nothing added to commit but untracked files present (use "git add" to track)
[michael@devserver autoapp]$ git diff
[michael@devserver autoapp]$ git checkout -
Already on 'master'
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
[michael@devserver autoapp]$