Just want you to be aware about two git commands, which people who use git and other git users who don't really use it are not aware about, since mostly git basics and git commit are the only topic that the people on the Internet talk about.
So, have you got a five minutes to go over extra material between your projects?
Take your time, and go over
git rebase and
git cherry-pick commands.
git-rebase is far beyond simple branch flatting and
git-cherry-pick allows you to take a bunch of commits and move them from one branch to another. So if you have a feature that is "magically working" and you want to make sense from it before you push it to
origin, you usually pretty much look how to repaint your git tree to make it look nicely.
Those two commands are the useful ones for you in any case like that.
In case you missed:
#TODO: learn those two commands git rebase git cherry-pick