The boss won't fire you saying that he could not stand you. "I fired X because I couldn't stand him", it would be a very unprofessional fire reason. He will say something, which is not easily provable false, but might be enough reason to fire you.
If you think a firing is going to happen, even if you think it is possible in the near future, start to search for your next job on the spot. Time is crucial, until you find your next job/project, you will earn 0.
The typical "reasons" for such firings are these:
- You can't work well with your team (yes, because he wants to fire you, and not to integrate you)
- You work slowly (he decides, what is "slow")
- Although you work well, unfortunately the company can't see a project for you, or can't inject you into its ongoing projects (yes, because he wants to fire you)
- ...any other
These are valid and well-reasonable reasons to fire you.
However, both you and also the company will know, that it is not the real reason.
Make clear for the Boss, that you want to leave peacefully without grudge. Or, at least that you want to look so. Don't expect him to admit, that not this is the real reason, but expect him to follow what I say in the next paragraph.
If the Boss can't stand you, then your leave will probably fulfill his thirst for blood. That makes his second top interest to make your leave peaceful and good-looking. The best possible outcome is that you agree in some similar: "Although they were satisfied with your work, unfortunately they had no task for you at the time, thus they had to agree in your leave", or similar.
Having a single short employment in your CV is not so bad. The bad is if you have a lot.
Never say on your job interviews in the future: "I was fired because my boss/co-workers disliked me", they will think that 1) you were bad 2) and you will likely say the same also from them!