Encountered x file(s) that should have been pointers, but weren’t
We encountered this issue when trying to merge master after someone had committed a slew of PDFs. Although we couldn’t identify the exact situation that caused this problem, the result is that nobody could merge master into their branches.
![Not No Body! Not No How!](https://i0.wp.com/y.yarn.co/59e023b4-810b-4c52-a704-0d9e613cd0d5_screenshot.jpg?w=525&ssl=1)
It looks like this was once filed as an issue with git, itself: https://github.com/git-lfs/git-lfs/issues/1939
But amongst the threaded comments, it looks like there is a root issue with the file types that are used to compare files and that on strange and rare occasions a unicorn fart fills the git-void with pain by changing these on the server.
After several dozen attempts, I came across this gem of a command:
$ git lfs migrate import --everything --include='*.pdf'
migrate: override changes in your working copy? [Y/n] Y
migrate: changes in your working copy will be overridden ...
migrate: Sorting commits: ..., done
migrate: Rewriting commits: 100% (5940/5940), done
migrate: Updating refs: ..., done
migrate: checkout: ..., done
The pain was almost over. Let’s see how merge does, now.
$ git merge --ff-only
fatal: Not possible to fast-forward, aborting.
Hmmm… Okay. Let’s not force a fast-forward merge; let’s just do a regular merge.
$ git merge
warning: Cannot merge binary files: Deployment Scripts/CopyFiles/UpperGreatLakesSinglesChallenge.pdf (HEAD vs. refs/remotes/origin/bugfix/13032-ems-error-saving-ppc)
:
:
CONFLICT (add/add): Merge conflict in Deployment Scripts/CopyFiles/UpperGreatLakesSinglesChallenge.pdf
Auto-merging Deployment Scripts/CopyFiles/UpperGreatLakesSinglesChallenge.pdf
:
:
Then I performed a manual merge on all the files by taking the server’s file (on the right in Sublime Merge, when resolving conflicts).
But Sublime Merge couldn’t actually commit the non-changes, so I went back to the git console to wrap up tackling the lfs-merge nightmare (like a Dream Warrior to Krueger):
$ git commit
[bugfix/13032-ems-error-saving-ppc f093b0c49] Merge remote-tracking branch 'refs/remotes/origin/bugfix/13032-ems-error-saving-ppc' into bugfix/13032-ems-error-saving-ppc
![See the source image](http://vignette2.wikia.nocookie.net/gravityfalls/images/2/2e/S1e10_winners_don't_lose.png/revision/latest?cb=20120921235220)