Little experience with SCM. Need help with project source management.

I'm an indie developer and I'm managing my builds using xcode scm (git repo) and with github.

I'm at a stage when I have to work on two different things at once on my project... Enhancements Feature change

At a later stage I might want the enhancements and not the feature changes, or keep both.

How should I - branch, merge and/or cherry pick on the current main branch since the Initial commit?

You should keep the main branch as close as possible to the current shipping code. That way, if there's some emergency issue, you can quickly fix it. You only want to merge new code into main when you're ready to issue a major update, or just after you've done so. And make sure to tag the any released code.

Do new features and enhancements in a new branch. The larger the organization, the more likely they would be to have many new branched, one per feature, and merge them one at a time. But as the organization gets smaller, that becomes less necessary and too much work to manage. You'll have to find your own sweet spot.

Enhancements are going to be applied to either the one with new features or the older one. So, I should branch out for the feature change and keep committing to main branch for enhancements?

Then when I merge the feature branch to the existing main branch commit with enhancements, it will not have the older feature code?

Aren't new features the same as enhancements?

Usually the delicate part is bug fixes. Those would get applied to older, currently shipping code. You could do them either in a branch or in main, but the idea is that, one way or another, bug fixes will relatively quickly update the main branch.

Then the delicate part is making sure that any pending branches are compatible with those bug fixes. In theory, since they're still pending, that's easy to do. At that point, you know about the bug and can fix any new code, while merging the fixes in the new main.

But it's all based on what you're comfortable with and what you can manage. Working as a lone developer, I wouldn't do a new branch for anything unless it was going to require weeks of effort and/or substantial changes/extensive testing. But back in the day, with 600 developers on a project, everything went into its own branch and the SCM team managed that. Testing was no big deal because we had a very large testing group and months-long test procedures.

Little experience with SCM. Need help with project source management.
 
 
Q