I disguised myself as a girl for a year and no one knew
That's a big commitment. Why did you dress up as a girl?
I wanted to play a joke on a guy and surprise him.
Even though you might find your joke funny, others might not. The man you pranked might get upset or angry that you fooled him into thinking you were a girl. Be careful that your pranks aren't mean or unkind.
It's fine no one got hurt and I was hoping it was for a prank.
Even if it all turned out fine in the end, you still potentially really mislead that guy for a long time. How did he feel when he finally found out? I hope you can go ahead and apologize, and attempt to make it up with him.