I have a master and “PersonalSite” branch for a codebase I’m working on. I have been repeatedly trying to merge the master into the PersonalSite branch to no avail.
This time, I thought I had everything straightened out, so I did:
git checkout master
git pull
git checkout PersonalSite
git pull
git merge master
It looked like everything was working, and it listed the set of files I would have expected, but there was a conflict. The conflict was correct and was as expected, so I fixed it, did “git add”, “git commit”, then “git push”. But now, when I look at my git log, it just shows a commit with no code changes but a single conflict.
Now, when I run “git merge master” from the “PersonalSite” branch it says “Already up-to-date.” but this clearly is not the case, as none of the changes I tried to merge actually merged. What exactly do I do to get master to actually merge at this point?
By fixing the conflict and committing the merge conflict you’ve already completed the merge. Git adds merge commits when necessary, it’s normal but they don’t record anything except that the merge took place and what files were merged if there was a conflict. If you look more closely at your log you’ll see there are in fact commits from master.
EDIT:
Okay, try this a test. You don’t have to use the merge command, you can just pull master into PersonalSite.
See what gives you. If it says up to date then you have merged correctly.
If you merge stuff locally like you did, then you need to ensure the local tracking branches are up to date. Always specify the branch name to pull from,