When I try to commit it just shows 2 files (which as @Jeff points out) seem to be duplicates of xcuserdata.
I have a .gitignore see below :
Xcode
.DS_Store
*/build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/*
profile
*.moved-aside
DerivedData
.idea/
*.hmap
My gitignore was called default.gitignore then I changed it to .gitignore, neither changed the outcome.
So : - is my .gitignore being ignored for some reason - why do I have 2 xcuserdata files and how do I get rid of one - looks the second file is a breakpoint compare failing - how do I stop this - and I can't even merge these files (Save button greyed out) to get around the problem and thus can't commit and thus can't merge.
It is hard to see the full error in the screenshot, but what is happening is that you are trying to do a merge while you have local changes, which you do not want to do. Instead, commit your changes first, then do the merge.