Hermione gives Ginny advice about Harry in Harry Potter and the Half-Blood Prince, specifically in the chapter "The Secret Riddle." Ginny struggles with Harry dating Luna; Hermione, knowing Harry's true feelings, urges Ginny to be honest with him.