1

I have a major problem. Nothing seems to work.. I'm using TortoiseGIT on windows. I pushed an update to my server, from my localhost.
The update didn’t work on that server so I went into the GIT History, clicked on an older version and ‘Reset the branch to this’, then pushed this older version onto the my server. And then this error showed up..

Parse error: syntax error, unexpected T_SL in /home/path/to/server/files/file.php 
             on line 4

I have tried to update the file again, but it keeps telling me everything is up-to-date, along with this error:

remote: Please, fix them up in the work tree, and then use ‘git add/rm ‘is not possible
remote: Please, fix them up in the work tree, and then use ‘git add/rm ’ have unmerged
remote: as appropriate to mark resolution, or use ‘git commit -a’.

I have tried to merge files, but it keeps telling me I’m up to date.

Any ideas on this? Anything would help greatly.

Thanks

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

0

A few comments:

  • any time you see "everything is up-to-date", you need to check if you are in a DETACHED HEAD mode or not.
  • when TortoiseGit fails for some reason, try the CLI (Command Line Interface) git (in a git bash session), starting with a git branch (to check the "detached head" mode), and a git status, to see what need to be added/rm'ed.
  • Git reason in term of snapshot of a all repository, but pushing an older version of a file will work if you reset a file, then add that new content of that (old version of the) file to the index and make a new commit (that you will be able to push), all within a branch.
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250