>>14757954All the galaxies inside the local galactic group are gravitating towards each other since they're so close, the triangulum galaxy for example is also heading towards andromeda(who's heading towards us), as for the other galaxies outside of the group, the expansion of the universe gets the upper hand and pushes them away.