The best way to make same changes in few versions of the same project

Hi!
I’ve got 3 projects, which are the same game with some minor changes. What is the best way to manage them? Let’s say I want to add a feature. I’ve been doing it manually in every project so far, but I think there must be a better way, since it takes a lot of time. How do you deal with it?

I usually do a git repository with some branches, and merge the common elements.
alt text