Is there a simple phrase for disregarding or not noticing another person, which would involve passively maintaining one's line of sight high or above the person in question, so as not to give him/her any attention? Here would be a usage example, which somehow does not really sound right to me: "When we passed each other I tried to get your attention, but you gazed high, so you must have a girlfriend already." Not being a native English speaker, I wonder, if any proper phrase exists, which would precisely capture this notion.
The OP expanded on their question in a comment, below, and may edit the question. An answer to the expanded question is:
A snub, cut or slight is a refusal to recognise an acquaintance by ignoring them, avoiding them or pretending not to know them. For example, a failure to greet someone may be considered a snub.
Some references consider a snub as an insult, for example, Merriam Websterhttp://www.merriam-webster.com/dictionary/snub
to ignore (someone) in a deliberate and insulting way
but a snub, while never good manners, is not necessarily an active insult. A can snub B because A is preoccupied, tired, wearing the wrong glasses or overwhelmed with things to do, which is why I prefer the Wikipedia definition.
turned up your nose
This phrase would fit exactly into your sentence.
The phrase can also be used figuratively, as defined in Cambridge Dictionaries Online http://dictionary.cambridge.org/us/dictionary/english/turn-your-nose-up
to not accept something because you do not think it is good enough for you: They turned their noses up at the only hotel that was available.
A variant is stuck up his nose, as in "I asked to see his lecture notes, but he just stuck up his nose and ignored me."
(This is very bad behavior.)
There is this, which I encountered while investigating the use of overlook for your purposes:
turn a blind eye to
Deliberately overlook, ignore, as in She decided to turn a blind eye to her roommate's goings-on. This expression is believed to come from the siege of Copenhagen (1801), in which Lord Horatio Nelson, second in command of the English fleet, was ordered to withdraw but pretended not to see the flagship's signals to do so by putting his glass to the eye that had been blinded in an earlier battle. His attack led to a major victory. Also see turn a deaf ear.
[turn a blind eye to. (n.d.) The American Heritage Dictionary of Idioms by Christine Ammer. (2003, 1997). Retrieved December 9 2015 from http://idioms.thefreedictionary.com/turn+a+blind+eye+to Emphasis mine.]
In your example, overlooked would convey your intended meaning quite well:
When we passed each other I tried to get your attention, but you overlooked me, so you must have a girlfriend already.
"Diverted your eyes (or gaze)" would be a natural fit, even if it doesn't convey the 'upwards' part. Even just "looked away" would be fine, the difference being that "diverted" implies the other party did notice you but chose to ignore you, whereas "looked away" could allow for the possibility they hadn't fully noticed you in the first place.