Wouldn’t it be easier and cleaner to use git submodules, and keep the private parts inside a submodule that lives as a private git repo? That way it’s easier to differentiate what’s public and what isn’t, and it’s also migrateable, so you wouldn’t need to add the private remote manually if you clone the repo on a new machine.

Thank you,
I have a quest.
first I had a master branch, then I made my private branch and I added some files or modified some files that are also in the master branch.
now I want to revert all the modified files in the private branch to the version of master branch , but keep the added files in this private branch.
every thing local, but im supposed to just push the private branch.
would you please help me? thank you.

First, as someone mentioned BitBucket is, IMO, at par or better than GitHub in terms of features. The fact that you can have unlimited private repos alone is enough a reason to migrate over. I understand that people like GitHub because it’s so popular, but you are missing out by not looking at BitBucket or other competitors.

Second, the problem is that GitHub is not supposed to be a CMS, even though some people want to use it as such. Use GitHub as a project/source base, have its website completely separate. You have to do so much git judo because you are trying to use it for something it wasn’t meant for.