So the first thing we'll talk about is the difference between public and private repositories on GitHub,
pretty straightforward.
There are two settings, right?
One, setting with two options.
You can make the visibility of any GitHub repository, public or private, assuming that you're the
owner and you have permission to make it public or private.
So when you create a new repository, it prompts you with that choice.
Here I have two GitHub accounts, the one I've been using, Colt, and then I made a new one for my
chicken, Steve Chicks.
So that's Steve Chicks.
I'm also trying to make it clear up top.
This is Stevie's account and this one's mine, because here it's somewhat easy to tell.
But once we get on an actual repository page, if we're looking at the same repo, it's really hard
to tell who is who.
You can look at this little photo up there, but that's kind of that's it.
So I put the name up top, Stevie and Colt.
Anyway, if I make a new repository, new repository, we've seen that it promptly for a name and then
hear public or private.
So there's an important difference.
A public repository is accessible, it's discoverable, it's cleanable by anyone on the Internet.
They can go find your repo by searching on GitHub.
They can find it by looking at your profile.
They can just have the link and view it right.
Anybody can access it.
That still does not mean people can change the contents of the repository.
They can't push to the repository.
They have to have collaborator privileges or permissions to do that.
And I'll show you how to set that up.
But that's a separate topic.
We're purely talking about visibility so anybody can see a public repo.
But when I make something private, it's only accessible to the owner, a.k.a. me, who created it,
and then people who have been granted access.
So they have explicitly been added as collaborators.
They then have access to a private repo.
Now things work slightly differently if we're talking about an organization or enterprise level GitHub
account where a private repository can be visible to everyone within the organization.
But we're working with personal free accounts, so a private repo is only visible to me, the owner
and people I specifically grant access to.
So let's try making sure let's go with their name that they suggest bookish Desco and then I'll make
it public to start.
OK, I'll just create.
We're not going to do anything in here.
I'm just making this repo so anybody can see this.
Now if they go to my profile, go to repositories here it is bookish disco.
OK, so if I copy this over I'm in Safari, I'm in a different browser here on Steve's account and if
I go to this URL to view it, that's kind of why it's confusing, right?
I'm viewing somebody else's account.
I see bookish disco, even though I'm logged in as somebody else now, I don't see the same display
like here.
If I go to bookish disco, I'm the owner.
So I see this information about getting set up.
But I also see settings.
I don't see that here.
I'm just some member of the public viewing the repository because it's public.
All right.
So speaking of settings, if you want to toggle or change that privacy under settings for a repository,
you have to be the owner unless we're talking about an organization or enterprise level account.
In that case, you don't have to be the owner, but you have to be granted permission to change the
visibility anyway.
If I want to change visibility, it's under options which we're already on, on settings, and then
you just scroll for a long, long ways down to the very bottom.
We're looking for the danger zone and then we have this right here, change repository visibility.
So I'm going to change visibility just to demonstrate this.
And I'm going to make it private, but it's going to ask me to type in.
Well, first, it actually just shows me all the all the changes that will happen.
Anybody who is watching the repository, anybody who has starred it, you can star repositories like
here's an example.
A couple of hundred people have started this one.
People are watching it.
They get notifications.
So if I make that private, that goes away.
But then also there's some other changes that go along with making something private.
I'll lose wikis and different poll requests and other things.
Basically, we're going private.
So anything involving the public goes away, but we don't have anything in here anyway.
So I'm going to type that.
It wants me to exactly type the name of the repo so called slash book ish dash desco.
All right.
I understand.
Change visibility now at once.
My password.
OK, so now it shows up as private right here.
I'm on my account as Colts'.
I'm the owner so I can see that.
But if I refresh this page where I'm logged in as Steve.
Four or four, I don't have access at all.
I can't see that repository.
I don't know it exists anymore.
It's gone private.
So that's the distinction and that's how you change them generally.
It's a pain.
If you have a public repo and you make it private, I don't recommend having some big established repository
with a whole bunch of collaborators and then going private and suddenly it's just gone.
But you can do that, OK?
Generally, I go the other direction, start something in secret, started private so people can't see
them.
For example, all these horrible little dumb demo reposts that we have just for this course, all these
get reposts like animals, colors, chickens, GitHub, demo novel.
I would normally make those private and then maybe make them public, but I'm making them public because
I want you to be able to see them.
This is a legit course, OK?