0

The error on my server says 'Parse error: syntax error, unexpected T_SL'. I receive this error after merging this specific file with someone else working on that file. It seems the error unexpected T_SL refers to bitwise operators <<. Now I am certain this has to do with the merge and looking at the git repo I dont see '<<' on that line. I have had this error long time ago and found out file was corrupted but dont remember the fix. Any help is good.

1 Answers1

0

If you already pushed the content, it's likely that the pattern << that you identified as bitwise operators is actually the git notation of a merge conflict (what Borealid tried to tell you with his comment).

If this was pushed, the conflict that occurred before wasn't solved correctly (and somebody pushed something without checking that it is at least working without major errors first).

An example for a marked conflict (and also help for resolving conflicts) could be found in the git manual:

<<<<<<< HEAD:file.txt
Hello world
=======
Goodbye
>>>>>>> 77976da35a11db4580b80ae27e8d65caf5208086:file.txt

This could be read that way:

  • there's a conflict in file file.txt
  • in revision HEAD, the line says Hello World
  • in revision 77976da, the line says Goodbye

Now, it's your task to decide which shall be used.

The accepted answer to the question How to resolve merge conflicts in Git? also points to the git manual, so it seems to be worth a read. But also the other answers to the referenced question have numerous hints for how to deal with merge conflicts.

For example, to keep Hello World, tell git to

git checkout --ours file.txt

to keep Goodbye instead use

git checkout --theirs file.txt
Community
  • 1
  • 1
eckes
  • 56,506
  • 25
  • 151
  • 189
  • yes this i understand. i have pushed incorrect merge and looking at the file and line number the pattern << is not visible and both my local and the pushed are now the same. I'll post the solution when i have an answer – user1028598 Feb 15 '12 at 22:05