This paper addresses a periodic trajectory tracking problem arising in spacecraft formation flying. In particular, the nonlinear position dynamics of a follower spacecraft relative to a leader spacecraft are utilized to develop a learning controller which learns a periodic, unknown model reference control. Using a Lyapunov-based approach, a full state feedback control law, a parameter update algorithm, and a model reference control estimate are designed that facilitate the tracking of given periodic reference trajectories in the presence of unknown leader and follower spacecraft masses. Furthermore, using a discrete Lyapunov-type stability analysis, model reference control error is shown to converge to zero. Illustrative simulations are included to demonstrate the efficacy of the proposed controller.