I have installed Git version 2.8.1.windows.1 and I run it under a MINGW64 bash shell.
I have a remote, bare repository that I push my commits to periodically (actually, almost after every commit). I generally terminate the session by entering a Ctrl-D.
On two occasions, after doing the first commit of the day, when I followed it up with a "git status
" command prior to pushing, it showed that I was one commit behind the remote repository (and one commit ahead).
It seems that the last commit I performed the prior day before shutting down was no longer on my local repository although my disk files reflected the most recent updates.
I was now forced to first do a merge with a "git pull
" on the remote repository, which clobbered my local files (conflicts) before I could push again.
What should I do to avoid this situation?