We study the rigidity problem for periodic orbits of (continuous) graph maps belonging to the same homotopy equivalence class. Since the underlying spaces are not necessarily homeomorphic, we define a new notion of pattern which enables us to compare periodic orbits of self-maps of homotopy-equivalent spaces. This definition unifies the known notions of pattern for other spaces. The two main results of the paper are as follows: given a free group endomorphism, we study the persistence under homotopy of the periodic orbits of its topological representatives, and in the irreducible case, we prove the minimality (within the homotopy class) of the set of periodic orbits of its efficient representatives.