1
00:00:02,260 --> 00:00:06,710
So this is our GitHub or Git project now.

2
00:00:06,710 --> 00:00:08,010
And to be honest,

3
00:00:08,010 --> 00:00:11,803
things are a bit lonely up to this point, right?

4
00:00:12,720 --> 00:00:17,720
Because basically we only used GitHub so far to bring our

5
00:00:18,090 --> 00:00:21,910
locally managed Git project to the cloud.

6
00:00:21,910 --> 00:00:24,610
This has great advantages.

7
00:00:24,610 --> 00:00:25,460
For example,

8
00:00:25,460 --> 00:00:26,690
we have a backup.

9
00:00:26,690 --> 00:00:27,523
So to say,

10
00:00:27,523 --> 00:00:29,790
in case our computer crashes,

11
00:00:29,790 --> 00:00:34,360
and we can also access our code from anywhere with the help

12
00:00:34,360 --> 00:00:37,810
of the personal access token of course.

13
00:00:37,810 --> 00:00:38,800
Nevertheless,

14
00:00:38,800 --> 00:00:42,950
we saw this earlier on the slide when we introduced GitHub.

15
00:00:42,950 --> 00:00:47,740
We also have other advantages that are only available when

16
00:00:47,740 --> 00:00:50,200
using it in combination with GitHub.

17
00:00:50,200 --> 00:00:52,320
And one of the core advantages here

18
00:00:52,320 --> 00:00:55,140
is the collaboration part.

19
00:00:55,140 --> 00:00:58,880
So the option to work on projects together

20
00:00:58,880 --> 00:01:01,160
with other developers,

21
00:01:01,160 --> 00:01:03,860
and this is where we will dive deeper.

22
00:01:03,860 --> 00:01:06,040
Now at this stage of the course,

23
00:01:06,040 --> 00:01:07,770
at this stage of this module,

24
00:01:07,770 --> 00:01:09,360
and to understand this,

25
00:01:09,360 --> 00:01:12,370
we have to go back to this public versus

26
00:01:12,370 --> 00:01:13,790
private repository

27
00:01:13,790 --> 00:01:17,788
thing we saw when we created our remote repository

28
00:01:17,788 --> 00:01:20,230
here on GitHub.

29
00:01:20,230 --> 00:01:21,153
For this,

30
00:01:22,270 --> 00:01:24,300
I'm here in another browser.

31
00:01:24,300 --> 00:01:26,950
This is the safari browser on Mac here.

32
00:01:26,950 --> 00:01:31,400
And if you look at the right top part here of this page,

33
00:01:31,400 --> 00:01:34,530
you see that I am not logged into GitHub here with my

34
00:01:34,530 --> 00:01:35,740
account.

35
00:01:35,740 --> 00:01:39,320
I'm on the M-LOAM GitHub page.

36
00:01:39,320 --> 00:01:42,400
So basically on the GitHub page of the account

37
00:01:42,400 --> 00:01:43,438
I used for the,

38
00:01:43,438 --> 00:01:44,520
well,

39
00:01:44,520 --> 00:01:47,710
first lectures of this module,

40
00:01:47,710 --> 00:01:49,240
GitHub part.

41
00:01:49,240 --> 00:01:50,073
Now,

42
00:01:50,073 --> 00:01:53,070
and as you see this web Def GitHub repository,

43
00:01:53,070 --> 00:01:56,060
we created is a public repository.

44
00:01:56,060 --> 00:01:57,370
You can see it here.

45
00:01:57,370 --> 00:01:59,610
And if I select this now

46
00:02:00,857 --> 00:02:02,900
and go to code over here,

47
00:02:02,900 --> 00:02:04,680
I could clone the code.

48
00:02:04,680 --> 00:02:06,380
We saw this process already.

49
00:02:06,380 --> 00:02:09,030
So with the help of this URL,

50
00:02:09,030 --> 00:02:10,750
we can access the code.

51
00:02:10,750 --> 00:02:14,410
And then we could theoretically push this code to this

52
00:02:14,410 --> 00:02:16,400
remote repository again.

53
00:02:16,400 --> 00:02:20,130
Of course you would need the personal access token granting

54
00:02:20,130 --> 00:02:23,843
us access to the account that holds this repository.

55
00:02:23,843 --> 00:02:25,110
So again,

56
00:02:25,110 --> 00:02:26,300
my accounts here,

57
00:02:26,300 --> 00:02:29,660
which is the so-called owner of this repository,

58
00:02:29,660 --> 00:02:30,700
but theoretically,

59
00:02:30,700 --> 00:02:32,560
this would work.

60
00:02:32,560 --> 00:02:34,740
Mm from a practical perspective though,

61
00:02:34,740 --> 00:02:37,060
this doesn't make too much sense.

62
00:02:37,060 --> 00:02:40,980
Assuming that this is a rather confidential project

63
00:02:40,980 --> 00:02:42,910
so to say an internal project,

64
00:02:42,910 --> 00:02:46,070
we are working on discord for our purposes for example,

65
00:02:46,070 --> 00:02:49,920
be a new update of the academy.com website.

66
00:02:49,920 --> 00:02:51,300
Well, this wouldn't be something

67
00:02:51,300 --> 00:02:54,060
we share in the public repository

68
00:02:54,060 --> 00:02:54,893
here,

69
00:02:54,893 --> 00:02:58,560
we would rather use a private repository and then add a

70
00:02:58,560 --> 00:03:01,720
so-called collaborator to this project,

71
00:03:01,720 --> 00:03:04,100
which would be another GitHub account.

72
00:03:04,100 --> 00:03:07,960
So the account of the person that has a specific task

73
00:03:07,960 --> 00:03:11,360
assigned as part of this website update,

74
00:03:11,360 --> 00:03:12,963
we might want to implement.

75
00:03:14,140 --> 00:03:16,160
What does this mean for us now?

76
00:03:16,160 --> 00:03:16,993
Well,

77
00:03:16,993 --> 00:03:20,670
first this means that we could create a new repository,

78
00:03:20,670 --> 00:03:22,950
a private repository now

79
00:03:22,950 --> 00:03:25,200
for this M-LOAM

80
00:03:25,200 --> 00:03:26,290
so also for your

81
00:03:26,290 --> 00:03:28,730
GitHub account here in this case,

82
00:03:28,730 --> 00:03:29,563
in step one,

83
00:03:29,563 --> 00:03:31,010
as I said,

84
00:03:31,010 --> 00:03:32,460
to do that,

85
00:03:32,460 --> 00:03:35,460
we have multiple options to access the repositories.

86
00:03:35,460 --> 00:03:39,610
One would be to go to our profile over here and then go to

87
00:03:39,610 --> 00:03:41,340
your repositories.

88
00:03:41,340 --> 00:03:42,860
And then we are back on this,

89
00:03:42,860 --> 00:03:43,693
well,

90
00:03:43,693 --> 00:03:44,980
repositories page here,

91
00:03:44,980 --> 00:03:45,840
this ribbon,

92
00:03:45,840 --> 00:03:46,880
this is by the way,

93
00:03:46,880 --> 00:03:47,713
the overview.

94
00:03:47,713 --> 00:03:49,040
So the starting page,

95
00:03:49,040 --> 00:03:51,050
which we can see over here,

96
00:03:51,050 --> 00:03:52,210
if we go back.

97
00:03:52,210 --> 00:03:53,330
So that's again here,

98
00:03:53,330 --> 00:03:56,463
this starting page of the corresponding GitHub account.

99
00:03:57,620 --> 00:04:00,760
So I'm on this page and if it would select it right here

100
00:04:00,760 --> 00:04:02,010
with not being locked in,

101
00:04:02,010 --> 00:04:03,186
I,

102
00:04:03,186 --> 00:04:04,019
of course,

103
00:04:04,019 --> 00:04:05,500
wouldn't be able to create a new repository,

104
00:04:05,500 --> 00:04:07,070
but here in this account,

105
00:04:07,070 --> 00:04:08,210
where I'm logged in.

106
00:04:08,210 --> 00:04:12,000
I could now say I go to the repositories ribbon in here.

107
00:04:12,000 --> 00:04:14,680
I'll create a new repository,

108
00:04:14,680 --> 00:04:15,970
nothing special here.

109
00:04:15,970 --> 00:04:18,540
We saw this already earlier in this module here,

110
00:04:18,540 --> 00:04:19,720
we could give this a name.

111
00:04:19,720 --> 00:04:21,279
Let's maybe call it

112
00:04:22,370 --> 00:04:23,440
shopping

113
00:04:24,990 --> 00:04:25,960
site.

114
00:04:25,960 --> 00:04:28,330
Let's say we have a online shop here.

115
00:04:28,330 --> 00:04:29,340
For example,

116
00:04:29,340 --> 00:04:30,173
we've owned,

117
00:04:30,173 --> 00:04:31,006
create an online shop,

118
00:04:31,006 --> 00:04:33,890
just to give you a better idea of how this might work

119
00:04:33,890 --> 00:04:35,510
practically.

120
00:04:35,510 --> 00:04:38,140
So this is the shopping side repository.

121
00:04:38,140 --> 00:04:39,660
We bond at a description,

122
00:04:39,660 --> 00:04:41,970
but this time we won't make it public,

123
00:04:41,970 --> 00:04:45,014
but we will set it to private so we can choose who can see

124
00:04:45,014 --> 00:04:48,170
and commit to this repository.

125
00:04:48,170 --> 00:04:49,830
And as you see it up here,

126
00:04:49,830 --> 00:04:53,550
we can also choose who can commit for a public repository.

127
00:04:53,550 --> 00:04:57,880
So this collaborator part is of course also possible for

128
00:04:57,880 --> 00:04:59,410
public repositories.

129
00:04:59,410 --> 00:05:00,350
Nevertheless,

130
00:05:00,350 --> 00:05:01,183
typically,

131
00:05:01,183 --> 00:05:02,080
if we have these,

132
00:05:02,080 --> 00:05:02,913
well,

133
00:05:02,913 --> 00:05:04,210
rather confidential projects,

134
00:05:04,210 --> 00:05:06,050
we will use private repositories.

135
00:05:06,050 --> 00:05:10,090
So I also want to show you this repository type here,

136
00:05:10,090 --> 00:05:10,923
we again,

137
00:05:10,923 --> 00:05:14,093
omit the options down here and create this repository now.

138
00:05:15,920 --> 00:05:16,753
Now we could,

139
00:05:16,753 --> 00:05:17,586
again,

140
00:05:17,586 --> 00:05:19,400
connect our local

141
00:05:20,250 --> 00:05:22,800
Git project with this repository.

142
00:05:22,800 --> 00:05:24,630
I'll do this in a few seconds,

143
00:05:24,630 --> 00:05:27,230
but not related to this account here.

144
00:05:27,230 --> 00:05:28,063
Therefore,

145
00:05:28,063 --> 00:05:30,820
what we'll do here is we'll create a new file.

146
00:05:30,820 --> 00:05:31,653
In here,

147
00:05:32,490 --> 00:05:37,190
and call it maybe landing page dot texts

148
00:05:37,190 --> 00:05:39,260
and could say code for

149
00:05:39,260 --> 00:05:43,720
the landing page of the shopping website.

150
00:05:44,720 --> 00:05:45,553
Of course,

151
00:05:45,553 --> 00:05:46,500
these are just some dummy data,

152
00:05:46,500 --> 00:05:47,350
as you can see,

153
00:05:47,350 --> 00:05:48,183
you know,

154
00:05:48,183 --> 00:05:49,680
where I'm coming from.

155
00:05:49,680 --> 00:05:54,140
Okay? So let's scroll down and let's commit this with added

156
00:05:54,140 --> 00:05:56,080
landing page,

157
00:05:56,080 --> 00:05:57,050
for example.

158
00:05:57,050 --> 00:05:59,023
And now we commit this new file,

159
00:06:00,280 --> 00:06:01,113
okay?

160
00:06:01,113 --> 00:06:02,000
With this we are done.

161
00:06:02,000 --> 00:06:05,906
And now let's say we want to have a team page being added to

162
00:06:05,906 --> 00:06:07,150
this website,

163
00:06:07,150 --> 00:06:09,410
and we don't want to do this on our own.

164
00:06:09,410 --> 00:06:13,410
We have another person inside or outside our company.

165
00:06:13,410 --> 00:06:17,370
Doesn't play a role here that has this task assigned.

166
00:06:17,370 --> 00:06:20,900
What this other person needs is just a GitHub account.

167
00:06:20,900 --> 00:06:25,420
And then we can add this person as so-called collaborator.

168
00:06:25,420 --> 00:06:28,630
Where can we add such a collaborator now?

169
00:06:28,630 --> 00:06:29,463
Well,

170
00:06:29,463 --> 00:06:34,463
we want to add a collaborator for a specific repository.

171
00:06:34,500 --> 00:06:36,780
Therefore the profile over here.

172
00:06:36,780 --> 00:06:40,450
So our GitHub profile or our GitHub account and settings is

173
00:06:40,450 --> 00:06:43,890
the wrong area because this affects the entire account

174
00:06:43,890 --> 00:06:45,010
so to say,

175
00:06:45,010 --> 00:06:48,260
but as you're currently inside our repository,

176
00:06:48,260 --> 00:06:49,830
our private repository here,

177
00:06:49,830 --> 00:06:51,000
by the way now.

178
00:06:51,000 --> 00:06:53,580
We can go to the settings option over here

179
00:06:55,020 --> 00:06:57,970
and there we go to manage access,

180
00:06:57,970 --> 00:06:58,803
this option.

181
00:07:00,080 --> 00:07:00,913
In here,

182
00:07:00,913 --> 00:07:03,670
we can now see that we have a private repository.

183
00:07:03,670 --> 00:07:07,247
So only those with access to this repository can view it.

184
00:07:07,247 --> 00:07:09,160
And I can also prove this to you.

185
00:07:09,160 --> 00:07:11,010
If I quickly go back to the,

186
00:07:11,010 --> 00:07:11,843
well,

187
00:07:11,843 --> 00:07:13,220
safari browser here with

188
00:07:13,220 --> 00:07:15,223
the GitHub page being opened.

189
00:07:16,110 --> 00:07:17,310
So in here this page,

190
00:07:17,310 --> 00:07:18,560
and if I reload,

191
00:07:18,560 --> 00:07:19,393
this,

192
00:07:20,530 --> 00:07:21,363
you see,

193
00:07:21,363 --> 00:07:24,600
we still only have this web dev GitHub repository in here

194
00:07:24,600 --> 00:07:26,250
because that's the public one.

195
00:07:26,250 --> 00:07:28,030
So we now have a private repository,

196
00:07:28,030 --> 00:07:30,270
which was exactly our goal.

197
00:07:30,270 --> 00:07:33,870
So let's go back and here we can see that we have zero

198
00:07:33,870 --> 00:07:37,350
collaborators who have access to this repository.

199
00:07:37,350 --> 00:07:38,183
And down here,

200
00:07:38,183 --> 00:07:40,670
we can invite a so-called collaborator.

201
00:07:40,670 --> 00:07:44,060
So why don't we do this to see what this is all about?

202
00:07:44,060 --> 00:07:45,133
So let's click here.

203
00:07:46,450 --> 00:07:48,740
And here we can now search for a

204
00:07:48,740 --> 00:07:49,670
username,

205
00:07:49,670 --> 00:07:53,900
the full name or the email off another GitHub account.

206
00:07:53,900 --> 00:07:54,733
And for this,

207
00:07:54,733 --> 00:07:58,250
I'll use my other GitHub account that I have,

208
00:07:58,250 --> 00:07:59,810
which is called

209
00:07:59,810 --> 00:08:01,330
manulorenz,

210
00:08:01,330 --> 00:08:04,070
please don't use the same one to send me the invitations,

211
00:08:04,070 --> 00:08:07,190
because well this would not be the goal of this lecture,

212
00:08:07,190 --> 00:08:08,870
to be honest.

213
00:08:08,870 --> 00:08:11,744
So I'll select my other account in case you want to follow

214
00:08:11,744 --> 00:08:12,850
along,

215
00:08:12,850 --> 00:08:15,944
you can just create a second GitHub account for yourself to

216
00:08:15,944 --> 00:08:17,920
then try this.

217
00:08:17,920 --> 00:08:20,150
So I'll use my other account.

218
00:08:20,150 --> 00:08:24,190
And now I'll add this account to this repository as

219
00:08:24,190 --> 00:08:26,330
so-called collaborator,

220
00:08:26,330 --> 00:08:29,243
let me do this by clicking on to add to this repository.

221
00:08:31,290 --> 00:08:32,123
Now,

222
00:08:32,123 --> 00:08:32,956
down here,

223
00:08:32,956 --> 00:08:35,280
you see that we are awaiting the response and yet,

224
00:08:35,280 --> 00:08:37,299
we have a pending in white.

225
00:08:37,299 --> 00:08:39,659
And if the other person in this case,

226
00:08:39,659 --> 00:08:41,640
while the other person is also myself,

227
00:08:41,640 --> 00:08:45,350
but let's assume that we have two different persons here.

228
00:08:45,350 --> 00:08:49,080
So if the other person then checks his email account,

229
00:08:49,080 --> 00:08:52,410
then this is what this invitation looks like.

230
00:08:52,410 --> 00:08:56,350
And if the other person then clicks onto view invitation and

231
00:08:56,350 --> 00:09:00,580
important this person has to be logged in into the GitHub

232
00:09:00,580 --> 00:09:02,743
account that was invited,

233
00:09:04,670 --> 00:09:08,740
then this other account should see this page here.

234
00:09:08,740 --> 00:09:10,340
And with that,

235
00:09:10,340 --> 00:09:12,680
we can now accept this invitation.

236
00:09:12,680 --> 00:09:17,290
And this means we added the other account as collaborator to

237
00:09:17,290 --> 00:09:19,040
our project.

238
00:09:19,040 --> 00:09:22,440
And now will be also see that this collaborator has the

239
00:09:22,440 --> 00:09:27,440
right to push changes to our shopping side repository.

240
00:09:28,600 --> 00:09:32,540
And if we now go back to the page who owns this repository.

241
00:09:32,540 --> 00:09:33,530
So in my case,

242
00:09:33,530 --> 00:09:36,260
this M-LOAM user,

243
00:09:36,260 --> 00:09:39,340
so GitHub.com here slash M-LOAM.

244
00:09:39,340 --> 00:09:42,980
So please use your account name here that you're using.

245
00:09:42,980 --> 00:09:44,440
So with this,

246
00:09:44,440 --> 00:09:45,540
you see,

247
00:09:45,540 --> 00:09:48,000
we now are on the overview page again,

248
00:09:48,000 --> 00:09:49,660
and in repositories,

249
00:09:49,660 --> 00:09:51,480
we now can see that besides our

250
00:09:51,480 --> 00:09:54,080
web Def GitHub public repository,

251
00:09:54,080 --> 00:09:58,330
this private repository is also accessible now.

252
00:09:58,330 --> 00:09:59,563
Let's access it here.

253
00:10:00,960 --> 00:10:03,340
And if we go back to our owner account,

254
00:10:03,340 --> 00:10:06,918
so the account who created this repository

255
00:10:06,918 --> 00:10:08,950
and reload this page to

256
00:10:10,300 --> 00:10:12,200
then you see that Manuel Lorenz.

257
00:10:12,200 --> 00:10:15,933
My case here now is a so-called collaborator.

258
00:10:17,420 --> 00:10:20,830
And this collaborator can now of course,

259
00:10:20,830 --> 00:10:22,430
well clone this project,

260
00:10:22,430 --> 00:10:23,530
for example,

261
00:10:23,530 --> 00:10:24,810
add changes,

262
00:10:24,810 --> 00:10:26,150
implement the team page,

263
00:10:26,150 --> 00:10:27,170
for example,

264
00:10:27,170 --> 00:10:31,133
and then push these changes to the remote repository.

265
00:10:32,050 --> 00:10:35,370
How does this work from a practical perspective now?

266
00:10:35,370 --> 00:10:36,203
Well,

267
00:10:36,203 --> 00:10:37,036
for this,

268
00:10:37,036 --> 00:10:39,010
let's go back to the other accounts.

269
00:10:39,010 --> 00:10:40,723
So to the collaborator account.

270
00:10:41,970 --> 00:10:42,803
There,

271
00:10:42,803 --> 00:10:46,670
we can now go to code inside the shopping side repository

272
00:10:46,670 --> 00:10:47,653
and copy the URL.

273
00:10:49,870 --> 00:10:51,400
Now,

274
00:10:51,400 --> 00:10:54,790
I'll create a new empty folder on my computer and the

275
00:10:54,790 --> 00:10:57,590
new visual studio code instance.

276
00:10:57,590 --> 00:11:00,830
So in here I created a new folder collaborate,

277
00:11:00,830 --> 00:11:03,950
which I drag and dropped into a new visual studio code

278
00:11:03,950 --> 00:11:04,783
instance,

279
00:11:04,783 --> 00:11:05,630
as I said,

280
00:11:05,630 --> 00:11:06,463
and we can also,

281
00:11:06,463 --> 00:11:07,296
again,

282
00:11:07,296 --> 00:11:09,803
bring up our um terminal here.

283
00:11:11,320 --> 00:11:12,153
Now in here,

284
00:11:12,153 --> 00:11:13,490
I'll run,

285
00:11:13,490 --> 00:11:14,940
Git clone

286
00:11:15,900 --> 00:11:18,450
now a space and I'll paste the URL.

287
00:11:18,450 --> 00:11:22,150
And as I said to make sure the folders and files are

288
00:11:22,150 --> 00:11:25,240
directly copied into this well collaborate folder,

289
00:11:25,240 --> 00:11:26,220
in my case,

290
00:11:26,220 --> 00:11:28,890
I'll add a space and dot with this.

291
00:11:28,890 --> 00:11:33,663
The copying will be done exactly as I just described it.

292
00:11:35,890 --> 00:11:36,723
Now,

293
00:11:36,723 --> 00:11:37,556
everything was cloned.

294
00:11:37,556 --> 00:11:39,600
No big surprise here,

295
00:11:39,600 --> 00:11:40,560
but now I can,

296
00:11:40,560 --> 00:11:41,410
for example,

297
00:11:41,410 --> 00:11:45,350
add a new file here and call it team

298
00:11:46,380 --> 00:11:48,313
page dot texts.

299
00:11:50,060 --> 00:11:51,500
We won't add any content here.

300
00:11:51,500 --> 00:11:53,710
It's just about the file actually.

301
00:11:53,710 --> 00:11:57,060
And now I can clear this and well,

302
00:11:57,060 --> 00:11:59,000
if I would push this now,

303
00:11:59,000 --> 00:12:00,570
then this would work.

304
00:12:00,570 --> 00:12:01,653
Do you know why?

305
00:12:02,530 --> 00:12:03,363
Well,

306
00:12:03,363 --> 00:12:04,196
because in my case,

307
00:12:04,196 --> 00:12:07,540
I'm working from the same machine here and this machine well

308
00:12:07,540 --> 00:12:11,410
contains the credentials of the owners.

309
00:12:11,410 --> 00:12:15,040
GitHub accounts at this M-LOAM account.

310
00:12:15,040 --> 00:12:16,630
And in the example,

311
00:12:16,630 --> 00:12:18,530
we are well showing you here,

312
00:12:18,530 --> 00:12:21,920
we actually would simulate two different machines.

313
00:12:21,920 --> 00:12:26,890
Therefore here we should get rid of the token of the

314
00:12:26,890 --> 00:12:31,560
personal access token that was stored on this machine.

315
00:12:31,560 --> 00:12:35,230
And we can get rid of this information as follows.

316
00:12:35,230 --> 00:12:38,190
We saw this already in the last lecture,

317
00:12:38,190 --> 00:12:41,320
so we run Git credential

318
00:12:41,320 --> 00:12:42,920
dash

319
00:12:42,920 --> 00:12:43,753
O,

320
00:12:44,840 --> 00:12:46,330
S, X

321
00:12:46,330 --> 00:12:47,720
key chain

322
00:12:47,720 --> 00:12:48,750
space,

323
00:12:48,750 --> 00:12:49,683
erase,

324
00:12:51,190 --> 00:12:52,023
enter.

325
00:12:53,370 --> 00:12:56,950
Now hosts is equal to GitHub.com

326
00:12:58,190 --> 00:13:00,390
and the protocol is

327
00:13:00,390 --> 00:13:01,573
HTTPS.

328
00:13:03,100 --> 00:13:05,920
Let's confirm this with enter twice.

329
00:13:05,920 --> 00:13:09,590
This means we could now push these changes we made before we

330
00:13:09,590 --> 00:13:10,423
do that though,

331
00:13:10,423 --> 00:13:12,400
we have to add these changes of course,

332
00:13:12,400 --> 00:13:14,050
to the staging area.

333
00:13:14,050 --> 00:13:16,090
And then also commit the changes

334
00:13:16,940 --> 00:13:19,940
with a message of added team page.

335
00:13:19,940 --> 00:13:21,210
For example,

336
00:13:21,210 --> 00:13:22,700
like this.

337
00:13:22,700 --> 00:13:23,720
And by the way,

338
00:13:23,720 --> 00:13:25,110
here in our project,

339
00:13:25,110 --> 00:13:26,800
if we check our branch,

340
00:13:26,800 --> 00:13:29,750
you'll see that we are working in the main branch.

341
00:13:29,750 --> 00:13:31,890
In typical projects,

342
00:13:31,890 --> 00:13:35,830
you wouldn't use the same branch to implement a new feature.

343
00:13:35,830 --> 00:13:38,810
You would have used a feature branch for example,

344
00:13:38,810 --> 00:13:40,350
and implemented the change in there,

345
00:13:40,350 --> 00:13:42,260
and then pushed this new branch.

346
00:13:42,260 --> 00:13:45,210
I want to focus on to the collaboration parts

347
00:13:45,210 --> 00:13:46,280
here in general.

348
00:13:46,280 --> 00:13:47,113
Therefore,

349
00:13:47,113 --> 00:13:48,640
we added this change here,

350
00:13:48,640 --> 00:13:51,230
inside this main branch,

351
00:13:51,230 --> 00:13:52,063
nevertheless,

352
00:13:52,063 --> 00:13:56,080
with the change now being well implemented or added as new

353
00:13:56,080 --> 00:13:56,913
commit,

354
00:13:56,913 --> 00:13:59,150
we can now push these change.

355
00:13:59,150 --> 00:14:03,240
And without the collaboration logic we implemented now for

356
00:14:03,240 --> 00:14:04,620
this user,

357
00:14:04,620 --> 00:14:08,450
we would either need the personal access token of the

358
00:14:08,450 --> 00:14:10,580
repository owner account.

359
00:14:10,580 --> 00:14:11,990
So in our case,

360
00:14:11,990 --> 00:14:15,100
this would be this M-LOAM account here,

361
00:14:15,100 --> 00:14:16,500
this one,

362
00:14:16,500 --> 00:14:19,400
or if we wouldn't have this personal access token,

363
00:14:19,400 --> 00:14:21,240
we couldn't push because otherwise

364
00:14:21,240 --> 00:14:23,910
we wouldn't have this required access,

365
00:14:23,910 --> 00:14:26,260
but with the second account.

366
00:14:26,260 --> 00:14:31,260
So this Manuel Lorenz account here now being a collaborator,

367
00:14:31,370 --> 00:14:34,520
granting ourselves access to this account

368
00:14:34,520 --> 00:14:35,700
and the repositories,

369
00:14:35,700 --> 00:14:37,670
this account has access to,

370
00:14:37,670 --> 00:14:41,160
will allow us to push to this repository,

371
00:14:41,160 --> 00:14:44,770
meaning to the shopping site repository we created

372
00:14:44,770 --> 00:14:48,270
in this account here with the other account,

373
00:14:48,270 --> 00:14:49,713
being a collaborator now.

374
00:14:51,960 --> 00:14:55,630
As we are talking about general account access here,

375
00:14:55,630 --> 00:14:57,940
we have to go to our profile settings

376
00:14:58,870 --> 00:14:59,703
down here,

377
00:15:01,210 --> 00:15:02,043
there,

378
00:15:02,043 --> 00:15:03,970
scroll down to the developer settings

379
00:15:04,860 --> 00:15:07,410
to personal access tokens.

380
00:15:07,410 --> 00:15:09,280
And there we can now create a new one

381
00:15:09,280 --> 00:15:12,260
by clicking on to generate new token.

382
00:15:12,260 --> 00:15:14,970
And here we could call it web Def

383
00:15:17,350 --> 00:15:18,183
course.

384
00:15:18,183 --> 00:15:22,380
maybe simple as that and elegant set the scope with all

385
00:15:23,420 --> 00:15:24,850
um rights,

386
00:15:24,850 --> 00:15:26,190
excluding admin rights.

387
00:15:26,190 --> 00:15:27,710
So repo workflow,

388
00:15:27,710 --> 00:15:28,750
right packages,

389
00:15:28,750 --> 00:15:29,693
delete packages,

390
00:15:30,930 --> 00:15:32,180
just notifications,

391
00:15:32,180 --> 00:15:34,290
user delete repo,

392
00:15:34,290 --> 00:15:36,350
and right discussion.

393
00:15:36,350 --> 00:15:37,183
And with this,

394
00:15:37,183 --> 00:15:38,740
we can now generate this token

395
00:15:40,450 --> 00:15:42,283
and copy it from here.

396
00:15:43,310 --> 00:15:45,010
Now, go back to we as code

397
00:15:46,570 --> 00:15:50,810
here now add Git push origin

398
00:15:51,950 --> 00:15:53,200
main.

399
00:15:53,200 --> 00:15:54,430
Let's see.

400
00:15:54,430 --> 00:15:57,440
Now we should be prompted to enter our credentials.

401
00:15:57,440 --> 00:15:58,273
Yes,

402
00:15:58,273 --> 00:15:59,106
this is working.

403
00:15:59,106 --> 00:16:01,100
We don't want to use the Git up extension.

404
00:16:01,100 --> 00:16:03,010
So let's cancel this.

405
00:16:03,010 --> 00:16:05,080
Now we have to enter the username.

406
00:16:05,080 --> 00:16:06,010
Keep in mind.

407
00:16:06,010 --> 00:16:09,590
This now refers to the collaborator accounts username.

408
00:16:09,590 --> 00:16:12,360
So in my case Manulorenz,

409
00:16:12,360 --> 00:16:13,193
here,

410
00:16:14,030 --> 00:16:16,003
I can confirm this with enter.

411
00:16:17,160 --> 00:16:20,090
Now I'll paste the personal access token.

412
00:16:20,090 --> 00:16:23,490
And after confirming this with enter two,

413
00:16:23,490 --> 00:16:24,323
yeah,

414
00:16:24,323 --> 00:16:28,840
we see that our main repository was updated with this added

415
00:16:28,840 --> 00:16:30,260
file now.

416
00:16:30,260 --> 00:16:33,120
And if we go back to the collaborator page for the

417
00:16:33,120 --> 00:16:35,040
repository and there,

418
00:16:35,040 --> 00:16:36,820
if you now click onto the well,

419
00:16:36,820 --> 00:16:38,473
GitHub symbol over there,

420
00:16:39,780 --> 00:16:42,037
we can find this repository here.

421
00:16:42,037 --> 00:16:45,730
You see it as a private repository with this lock symbol

422
00:16:45,730 --> 00:16:46,830
right here.

423
00:16:46,830 --> 00:16:48,870
Let's access this now.

424
00:16:48,870 --> 00:16:52,260
And then you'll see that we added this team page dot text

425
00:16:52,260 --> 00:16:55,943
file as a separate commits to commits in total here.

426
00:16:56,890 --> 00:16:59,623
And by going back to the owner account now,

427
00:17:00,500 --> 00:17:03,140
over here by either doing the same thing

428
00:17:03,140 --> 00:17:05,359
by clicking onto the GitHub symbol or by

429
00:17:05,359 --> 00:17:08,609
accessing the shopping site repo directly in here.

430
00:17:08,609 --> 00:17:09,443
you see,

431
00:17:09,443 --> 00:17:10,276
well, the same thing.

432
00:17:10,276 --> 00:17:11,108
Basically,

433
00:17:11,108 --> 00:17:12,010
we have two commits in here.

434
00:17:12,010 --> 00:17:13,900
Now with the second commit,

435
00:17:13,900 --> 00:17:17,480
including this team page dot text file also visible.

436
00:17:17,480 --> 00:17:20,660
If we click onto the commits there you can see that I added

437
00:17:20,660 --> 00:17:21,690
this,

438
00:17:21,690 --> 00:17:23,589
so this is working,

439
00:17:23,589 --> 00:17:27,160
but what if one of the two people

440
00:17:27,160 --> 00:17:31,120
involved here updates code on GitHub?

441
00:17:31,120 --> 00:17:35,150
How can the other person access this updated code

442
00:17:35,150 --> 00:17:36,250
via Git then?

443
00:17:36,250 --> 00:17:38,970
Because we have to connection to get and get up for both

444
00:17:38,970 --> 00:17:41,270
users for both collaborators.

445
00:17:41,270 --> 00:17:44,520
But this updating process is something

446
00:17:44,520 --> 00:17:46,980
we didn't cover so far.

447
00:17:46,980 --> 00:17:50,550
For this myself here in this owner account.

448
00:17:50,550 --> 00:17:51,600
So to say,

449
00:17:51,600 --> 00:17:53,910
we'll now go back to the repository

450
00:17:54,890 --> 00:17:57,970
and I'll just add a new file in here.

451
00:17:57,970 --> 00:17:59,333
Let's create a new file,

452
00:18:00,490 --> 00:18:03,280
and I'll call this file

453
00:18:03,280 --> 00:18:06,730
added remote dot texts.

454
00:18:06,730 --> 00:18:09,890
So I added this in the remote repository,

455
00:18:09,890 --> 00:18:12,060
I'll omit any texts in there.

456
00:18:12,060 --> 00:18:14,060
And I'll just add this commit

457
00:18:14,060 --> 00:18:16,270
added remote

458
00:18:16,270 --> 00:18:18,330
text file in there.

459
00:18:18,330 --> 00:18:21,140
So this file is added on GitHub now.

460
00:18:21,140 --> 00:18:23,270
So I'll commit this new file and

461
00:18:23,270 --> 00:18:26,820
therefore the repository is updated.

462
00:18:26,820 --> 00:18:27,653
And if,

463
00:18:27,653 --> 00:18:29,310
and I'll go back to vs code

464
00:18:30,570 --> 00:18:31,403
in here,

465
00:18:31,403 --> 00:18:33,258
I am in the collaborator,

466
00:18:33,258 --> 00:18:34,300
of Git project.

467
00:18:34,300 --> 00:18:35,133
So to say,

468
00:18:35,133 --> 00:18:37,090
which you could clear once again,

469
00:18:37,090 --> 00:18:39,793
then we don't have this latest stage in here.

470
00:18:40,810 --> 00:18:44,650
Well to update our local repository,

471
00:18:44,650 --> 00:18:49,560
we can simply run in other Git command and we know Git push

472
00:18:49,560 --> 00:18:54,560
already to bring local changes to the remote repository and

473
00:18:54,940 --> 00:18:56,460
to do it the other way around.

474
00:18:56,460 --> 00:18:57,950
So to bring changes from

475
00:18:57,950 --> 00:19:01,020
the remote repository to our local one,

476
00:19:01,020 --> 00:19:02,973
we just use Git pull.

477
00:19:03,940 --> 00:19:05,430
If we run this command,

478
00:19:05,430 --> 00:19:06,263
now,

479
00:19:07,300 --> 00:19:11,970
you'll see that our local repository was updated.

480
00:19:11,970 --> 00:19:14,853
And by now running Git log,

481
00:19:16,140 --> 00:19:20,350
you'll see that this added remote text file commit is now

482
00:19:20,350 --> 00:19:23,853
part of our local repository.

483
00:19:24,950 --> 00:19:28,140
So this is how this all ties together with this.

484
00:19:28,140 --> 00:19:30,630
We can work locally on Git.

485
00:19:30,630 --> 00:19:34,530
Bring the changes to GitHub also amongst other

486
00:19:34,530 --> 00:19:35,900
collaborators.

487
00:19:35,900 --> 00:19:40,160
And in case our remote repository was updated.

488
00:19:40,160 --> 00:19:44,630
We can receive this updated information locally on Git

489
00:19:44,630 --> 00:19:46,313
with Git pull.

490
00:19:47,270 --> 00:19:48,550
With this,

491
00:19:48,550 --> 00:19:52,420
I want to conclude this collaboration part.

492
00:19:52,420 --> 00:19:57,420
And I would like to introduce one additional core concept,

493
00:19:57,440 --> 00:20:01,270
which is important whenever multiple people might

494
00:20:01,270 --> 00:20:02,290
contribute,

495
00:20:02,290 --> 00:20:03,330
not collaborate,

496
00:20:03,330 --> 00:20:07,240
but contribute to a specific project.

497
00:20:07,240 --> 00:20:11,400
So contribution is the last core part of this lecture.

498
00:20:11,400 --> 00:20:13,593
We'll dive into as a next step.

