$ cd my/repo
$ git checkout develop
$ git fetch origin
$ git checkout -b branch origin/branch
$ git pull origin HEAD
CONFLICT (content): Merge conflict in folder/file.ext
Auto-merging folder/file.ext
Automatic merge failed; fix conflicts and then commit the result.
I am really confused as to why my branch wasn't already up to date. I thought git fetch
grabs all the remote branches with their delta info from origin.
Even after going back to develop, deleting branch and repeating the steps, the problem is repeated. What am I doing wrong? I just want to be sure to take --theirs, but even after I do
$ git checkout --theirs folder/file.ext
git status
shows folder/file.ext has been modified and wants to me to commit the changes. I don't understand why there are changes to be committed at all. I just want origin/branch exactly as it is at origin, locally, in a tracking branch named the same.
How is this achieved?