Open Source is sometimes described as "anyone can contribute", but that's an oversimplification. Open Source projects always have a gatekeeper or small community of gatekeepers who decide which contributions are actually incorporated into the project and which are rejected as not up to snuff or straight up bad ideas or whatever.
That's what you meant by your first question, right? Not "how do I hide the code of future changes" but "how do I retain control over what code is added to my repo", correct?
Even if you meant it the other way, you could theoretically do that. Open Source one version and then never release any newer versions.