I preformed a git status on my local machine. It said "Your branch is ahead of 'origin/master' by 25 commits."
[me@myserver hours_portal]$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 25 commits.
# (use "git push" to publish your local commits)
nothing to commit, working directory clean
Since the answer implied that I was ahead I ran a git push.
[me@myserver hours_portal]$ git push origin master
Username for 'https://remoteserver': me
Password for 'https://me@remoteserver':
To https://remoteserver/project.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://remoteserver/project.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Next, i preformed a git pull thinking that if there was a conflict it would fail.
[me@myserver hours_portal]$ git pull
Username for 'https://remoteserver': me
Password for 'https://me@remoteserver':
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
From https://remoteserver/project
778077b..9122bba master -> origin/master
Updating 84c39ac..9122bba
Fast-forward
includes/calendar.inc.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
I was surprised the pull did not fail with conflict errors. So I did another git status.
[me@myserver hours_portal]$ git status
# On branch master
nothing to commit, working directory clean
My Questions:
Is there a way to figure out what those 25 original commits were?
Did I lose any data?
Was this a git pull bug I read about in git: Your branch is Ahead by X commits?