I just want to know, if possible, how can I make a specific branch public in a private GitHub repository?
1 Answer
It's not possible to make a specific branch public in a private repository. GitHub doesn't support this, and I'm not aware of any hosting providers which do.
In general, making only certain branches public doesn't match very well with the way Git works, which is that references are fetched before the data. Git will only prompt for authentication credentials over HTTPS if it gets a 401 response. However, if there were any references that were public, then the server would have to return those instead of a 401 response, so there would be no way to see all of the private references, since Git wouldn't know to send authentication credentials.