Git Empty message unchanged

I am trying to eliminate a scenario that appears, apparently by chance, every couple of days or so.

I switch to a branch that I did not touch, and they told me that I was โ€œaheadโ€ of the remote branch, despite the fact that I did not make any commits in this branch. Then I try to find out what local changes I made, and I can not find them. Running git push to seem to solve the problem, but it makes us nervous to blindly push those who know it willy-nilly, not understanding the root problem. I have included the command below, which I think illustrates my confusion. If I get ahead of the remote, shouldn't git diff return my changes? I think I'm updated with the remote control, and this is what I'm trying to show with the inclusion of git fetch / git pull commands.

  $ echo '====FETCH====' && git fetch && echo '====PULL====' && git pull && echo '====STATUS====' && git status && echo '====DIFF====' && git diff && echo '==== DIFF ORIGIN/DEV====' && git diff origin/dev ====FETCH==== ====PULL==== Already up-to-date. ====STATUS==== On branch dev Your branch is ahead of 'origin/dev' by 1 commit. (use "git push" to publish your local commits) nothing to commit, working directory clean ====DIFF==== ====DIFF ORIGIN/DEV==== 

Does anyone know what is going on here?

+5
source share
1 answer

It seems to me that its merging happens using git. You can check the logs and check the comment against commit. You can easily determine if its merge is completed or not.

+1
source

All Articles