I occasionally get thrown by the behavior of git. As I understand what I did below, I took the current version of the branch "public" on the remote repository, and replaced everything I had with it. Nothing I was working on should still be there.
Then I pulled "public" from the remote repository again. Voila! Now I am one commit ahead, locally.
Can you tell me what happened?
[edit] People very properly asked me what version of git I am using. 2.1.4 I added a git --version to my code section below.
rhedin@RHEDIN1-T430 ~/gogo/portal/gogo_flightTracker (public)
$ git status
# On branch public
# Your branch is ahead of 'origin/public' by 1 commit.
#
nothing to commit (working directory clean)
rhedin@RHEDIN1-T430 ~/gogo/portal/gogo_flightTracker (public)
$ git reset --hard origin/public
HEAD is now at 30cdb42 Remove O/D from window display if 640px window.innerWidth or less
rhedin@RHEDIN1-T430 ~/gogo/portal/gogo_flightTracker (public)
$ git status
# On branch public
nothing to commit (working directory clean)
rhedin@RHEDIN1-T430 ~/gogo/portal/gogo_flightTracker (public)
$ git pull origin public
\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" get: -c: line 0: syntax error near unexpected token `('
\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" get: -c: line 0: `\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" get'
Username for 'https://github.com':
Password for 'https://rickhedin@github.com':
\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" store: -c: line 0: syntax error near unexpected token `('
\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" store: -c: line 0: `\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\" store'
From https://github.com/gogoit/gogo_flightTracker
* branch public -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Fast-forwarded public to 2e65060cef06715081e54f776e0f7269e8d65ba7.
rhedin@RHEDIN1-T430 ~/gogo/portal/gogo_flightTracker (public)
$ git status
# On branch public
# Your branch is ahead of 'origin/public' by 1 commit.
#
nothing to commit (working directory clean)
rhedin@RHEDIN1-T430 ~/gogo/portal/gogo_flightTracker (public)
$
rhedin@RHEDIN1-T430 /cygdrive/c/work/150502
$ git --version
git version 2.1.4