git status on the server returns:
On branch develop
Your branch is ahead of 'origin/develop' by 14 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
My goal is to get the git branch on gitlab.com and on the server synchronized. When I look at the difference between the two, the commits that it states that remote on the server is ahead, are commits I believe are actually there on gitlab.com.
I did the following on the server:
git statusreturns "Your branch is ahead of 'origin/develop' by 14 commits."git reset --soft HEAD~1git statusnow returns "branch is up-to-date with origin/develop. Changes to be committed:" and then a list with changes.git reset --hardgit statusnow returns "branch is up-to-date with origin/develop. Nothing to commit."git logis missing the latest commits and therefore essentially disagrees with step 5.git pull origin developThis pulls various changes (how is that possible since step 5 returns "up-to-date"...?).git statusreturns the original message "ahead of 'origin/develop' by 14 commits" and I'm back where I started.
I don't understand this. How can the server return to being ahead of gitlab.com (step 8) after pulling from gitlab...? I removed all changes on the server and just did a pull...
git log origin/develop..to see the new commits. Yes, with 2 dots.git log origin/develop.., this returns nothing, not even a blank line... And if I do it after step 7, it returns a list of commits that are on gitlab.com, so I don't see why it would consider the server to be ahead these commits in comparison to gitlab.com (after all, it just pulled them from gitlab.com).git statussays "Your branch is ahead of 'origin/develop' by 14 commits", it is not looking at gitlab. It is looking at a local branch, a tracking branch which may not be up to date with what's on gitlab. — Also I'm confused by your statements "git statuson the server" and "I did the following on the server"... really? You gave those commands through ssh or something? Why would you ever do such a thing?