I’m sorry if the title isn’t clear, but this is a weird problem.
I git checkout
to my "stage" branch and git pull
to get my partner’s latest changes (which he pushed last night to the "stage" branch on the remote repository), and sure enough, they merge to my local "stage" branch. git log <branch>
shows five commits he performed last night.
I then switch over to the master branch to pull that from the repo because he told me he merged those changes to the master branch after testing them. But when I git checkout stage
to get back to my "stage" branch it says I’m ahead of the remote branch by 5 commits. I git log origin/stage
and it shows none of the five commits I just pulled from that repository (the only remote repository on this project). git log stage
shows the five commits on my local "stage" branch, so I’m at a loss at how the remote branch could have gone back in time immediately after serving me my partner’s latest commits.
I’m pretty new at this, so I’ll appreciate your patience with me, as I’m still trying to grasp DCVSs and there’s a good chance I’m simply misunderstanding something really basic.
Try this command:
git log origin/stage..stage
This show you what you are ahead of the remote. Do a git rebase origin/stage
/ git push
as appropriate.
If it doesn't help, see this question : 'git pull origin mybranch' leaves local mybranch N commits ahead of origin. Why?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With