1
00:00:00,150 --> 00:00:05,310
So the first thing we'll talk about is the difference between public and private repositories on GitHub,

2
00:00:05,580 --> 00:00:06,640
pretty straightforward.

3
00:00:07,230 --> 00:00:08,650
There are two settings, right?

4
00:00:08,910 --> 00:00:10,350
One, setting with two options.

5
00:00:10,500 --> 00:00:15,780
You can make the visibility of any GitHub repository, public or private, assuming that you're the

6
00:00:15,780 --> 00:00:18,760
owner and you have permission to make it public or private.

7
00:00:19,320 --> 00:00:22,470
So when you create a new repository, it prompts you with that choice.

8
00:00:23,220 --> 00:00:28,560
Here I have two GitHub accounts, the one I've been using, Colt, and then I made a new one for my

9
00:00:28,560 --> 00:00:30,210
chicken, Steve Chicks.

10
00:00:30,780 --> 00:00:32,310
So that's Steve Chicks.

11
00:00:32,310 --> 00:00:33,840
I'm also trying to make it clear up top.

12
00:00:34,080 --> 00:00:38,340
This is Stevie's account and this one's mine, because here it's somewhat easy to tell.

13
00:00:38,340 --> 00:00:43,500
But once we get on an actual repository page, if we're looking at the same repo, it's really hard

14
00:00:43,500 --> 00:00:44,580
to tell who is who.

15
00:00:44,580 --> 00:00:47,650
You can look at this little photo up there, but that's kind of that's it.

16
00:00:47,910 --> 00:00:50,880
So I put the name up top, Stevie and Colt.

17
00:00:51,120 --> 00:00:57,060
Anyway, if I make a new repository, new repository, we've seen that it promptly for a name and then

18
00:00:57,060 --> 00:00:59,480
hear public or private.

19
00:01:00,000 --> 00:01:01,620
So there's an important difference.

20
00:01:01,710 --> 00:01:07,860
A public repository is accessible, it's discoverable, it's cleanable by anyone on the Internet.

21
00:01:08,160 --> 00:01:10,740
They can go find your repo by searching on GitHub.

22
00:01:10,740 --> 00:01:13,110
They can find it by looking at your profile.

23
00:01:14,040 --> 00:01:16,610
They can just have the link and view it right.

24
00:01:16,630 --> 00:01:18,000
Anybody can access it.

25
00:01:18,300 --> 00:01:22,380
That still does not mean people can change the contents of the repository.

26
00:01:22,380 --> 00:01:24,270
They can't push to the repository.

27
00:01:24,600 --> 00:01:28,080
They have to have collaborator privileges or permissions to do that.

28
00:01:28,650 --> 00:01:30,120
And I'll show you how to set that up.

29
00:01:30,180 --> 00:01:31,560
But that's a separate topic.

30
00:01:31,920 --> 00:01:36,180
We're purely talking about visibility so anybody can see a public repo.

31
00:01:36,480 --> 00:01:42,480
But when I make something private, it's only accessible to the owner, a.k.a. me, who created it,

32
00:01:42,810 --> 00:01:45,420
and then people who have been granted access.

33
00:01:45,420 --> 00:01:48,750
So they have explicitly been added as collaborators.

34
00:01:48,780 --> 00:01:51,270
They then have access to a private repo.

35
00:01:52,020 --> 00:01:57,120
Now things work slightly differently if we're talking about an organization or enterprise level GitHub

36
00:01:57,120 --> 00:02:02,520
account where a private repository can be visible to everyone within the organization.

37
00:02:02,880 --> 00:02:08,010
But we're working with personal free accounts, so a private repo is only visible to me, the owner

38
00:02:08,010 --> 00:02:10,770
and people I specifically grant access to.

39
00:02:11,220 --> 00:02:18,210
So let's try making sure let's go with their name that they suggest bookish Desco and then I'll make

40
00:02:18,210 --> 00:02:19,320
it public to start.

41
00:02:19,680 --> 00:02:21,510
OK, I'll just create.

42
00:02:21,840 --> 00:02:22,980
We're not going to do anything in here.

43
00:02:23,100 --> 00:02:25,830
I'm just making this repo so anybody can see this.

44
00:02:25,830 --> 00:02:31,560
Now if they go to my profile, go to repositories here it is bookish disco.

45
00:02:32,190 --> 00:02:39,450
OK, so if I copy this over I'm in Safari, I'm in a different browser here on Steve's account and if

46
00:02:39,450 --> 00:02:44,070
I go to this URL to view it, that's kind of why it's confusing, right?

47
00:02:44,070 --> 00:02:46,020
I'm viewing somebody else's account.

48
00:02:46,200 --> 00:02:52,980
I see bookish disco, even though I'm logged in as somebody else now, I don't see the same display

49
00:02:53,010 --> 00:02:53,670
like here.

50
00:02:53,820 --> 00:02:56,130
If I go to bookish disco, I'm the owner.

51
00:02:56,340 --> 00:02:58,650
So I see this information about getting set up.

52
00:02:58,650 --> 00:03:00,270
But I also see settings.

53
00:03:00,840 --> 00:03:02,160
I don't see that here.

54
00:03:02,610 --> 00:03:07,080
I'm just some member of the public viewing the repository because it's public.

55
00:03:07,590 --> 00:03:08,070
All right.

56
00:03:08,490 --> 00:03:15,240
So speaking of settings, if you want to toggle or change that privacy under settings for a repository,

57
00:03:15,240 --> 00:03:20,400
you have to be the owner unless we're talking about an organization or enterprise level account.

58
00:03:20,820 --> 00:03:25,500
In that case, you don't have to be the owner, but you have to be granted permission to change the

59
00:03:25,500 --> 00:03:26,700
visibility anyway.

60
00:03:26,700 --> 00:03:31,890
If I want to change visibility, it's under options which we're already on, on settings, and then

61
00:03:31,890 --> 00:03:35,580
you just scroll for a long, long ways down to the very bottom.

62
00:03:35,730 --> 00:03:41,400
We're looking for the danger zone and then we have this right here, change repository visibility.

63
00:03:42,090 --> 00:03:45,570
So I'm going to change visibility just to demonstrate this.

64
00:03:46,020 --> 00:03:50,250
And I'm going to make it private, but it's going to ask me to type in.

65
00:03:50,700 --> 00:03:54,360
Well, first, it actually just shows me all the all the changes that will happen.

66
00:03:54,690 --> 00:04:01,860
Anybody who is watching the repository, anybody who has starred it, you can star repositories like

67
00:04:01,860 --> 00:04:02,700
here's an example.

68
00:04:02,970 --> 00:04:05,070
A couple of hundred people have started this one.

69
00:04:05,070 --> 00:04:06,030
People are watching it.

70
00:04:06,030 --> 00:04:07,080
They get notifications.

71
00:04:07,320 --> 00:04:09,990
So if I make that private, that goes away.

72
00:04:10,620 --> 00:04:14,460
But then also there's some other changes that go along with making something private.

73
00:04:14,610 --> 00:04:18,540
I'll lose wikis and different poll requests and other things.

74
00:04:18,690 --> 00:04:20,250
Basically, we're going private.

75
00:04:20,250 --> 00:04:24,600
So anything involving the public goes away, but we don't have anything in here anyway.

76
00:04:24,630 --> 00:04:25,860
So I'm going to type that.

77
00:04:25,980 --> 00:04:33,030
It wants me to exactly type the name of the repo so called slash book ish dash desco.

78
00:04:33,420 --> 00:04:33,990
All right.

79
00:04:33,990 --> 00:04:34,650
I understand.

80
00:04:34,650 --> 00:04:36,630
Change visibility now at once.

81
00:04:36,630 --> 00:04:37,200
My password.

82
00:04:37,500 --> 00:04:40,530
OK, so now it shows up as private right here.

83
00:04:40,710 --> 00:04:42,180
I'm on my account as Colts'.

84
00:04:42,180 --> 00:04:43,950
I'm the owner so I can see that.

85
00:04:44,340 --> 00:04:46,920
But if I refresh this page where I'm logged in as Steve.

86
00:04:48,050 --> 00:04:50,010
Four or four, I don't have access at all.

87
00:04:50,180 --> 00:04:51,780
I can't see that repository.

88
00:04:51,830 --> 00:04:53,120
I don't know it exists anymore.

89
00:04:53,130 --> 00:04:54,040
It's gone private.

90
00:04:54,560 --> 00:04:58,050
So that's the distinction and that's how you change them generally.

91
00:04:58,190 --> 00:04:58,820
It's a pain.

92
00:04:58,820 --> 00:05:05,240
If you have a public repo and you make it private, I don't recommend having some big established repository

93
00:05:05,240 --> 00:05:09,890
with a whole bunch of collaborators and then going private and suddenly it's just gone.

94
00:05:10,670 --> 00:05:12,470
But you can do that, OK?

95
00:05:12,740 --> 00:05:17,240
Generally, I go the other direction, start something in secret, started private so people can't see

96
00:05:17,240 --> 00:05:17,510
them.

97
00:05:17,840 --> 00:05:24,140
For example, all these horrible little dumb demo reposts that we have just for this course, all these

98
00:05:24,350 --> 00:05:28,130
get reposts like animals, colors, chickens, GitHub, demo novel.

99
00:05:28,370 --> 00:05:34,580
I would normally make those private and then maybe make them public, but I'm making them public because

100
00:05:34,580 --> 00:05:35,630
I want you to be able to see them.

101
00:05:35,630 --> 00:05:37,250
This is a legit course, OK?
