0

After pulling updates from the origin remote, master branch, I've checked into my local dev branch & tried to git rebase master. There were a few conflicts. Whilst most of these were simple to resolve, I'm stuck on the conflicts where files have been renamed on the origin remote (they'd been updated to include hyphens in the file names, but this means my local file names are now out of date).

So the conflict message is along these lines: Auto-merging data/foldername/file-name.yml CONFLICT (content): Merge conflict in data/foldername/file-name.yml Failed to merge in the changes.

I've had a search around but can't find a definitive answer as to how to resolve this type of conflict. I wondered if renaming my local files to match those on the origin remote would resolve the conflict, but I'm worried this might backfire.

Any pointers would be greatly appreciated. Thanks.

ldn_34
  • 11
  • 1

1 Answers1

0

Actually I had attributed this conflict to the wrong thing. I thought the conflict flagged by Git was related to updated file names on the origin remote (compared to my local dev branch file names). However, Git is smart enough to detect renames as it keeps track of content, and will make an educated guess that my local file is simply a rename by looking for similar files in previous revisions.

So long story short, whilst I'd been stressing about the flagged file's name, actually all Git cared about was me fixing the conflict in the content. Once that conflict was resolved and I'd done a git add for that file, I was able to continue with the rebase.

ldn_34
  • 11
  • 1