Your method works well, too. Since I license everything I develop under GPLv3, I keep them private until they mature, then I just flip a switch and make the project visible.
For some research I use a private Git server. However, even that code might get released as Free Software when it matures enough.
For some research I use a private Git server. However, even that code might get released as Free Software when it matures enough.