1
00:00:02,070 --> 00:00:06,510
So we saw lots of good terms and fury now let's now apply.

2
00:00:06,510 --> 00:00:07,960
Get in practice.

3
00:00:07,960 --> 00:00:11,810
And for this, we first will create a new folder.

4
00:00:11,810 --> 00:00:14,930
In my case, I'll create it here on the desktop.

5
00:00:14,930 --> 00:00:18,763
So we'll create a new one and let's call this folder,

6
00:00:21,241 --> 00:00:22,380
get basics.

7
00:00:22,380 --> 00:00:25,550
Now we need a new visual studio code instance,

8
00:00:25,550 --> 00:00:30,430
a new visual studio code window, which I got right here.

9
00:00:30,430 --> 00:00:34,860
And now I'll simply drag this folder into VS code. Yes,

10
00:00:34,860 --> 00:00:38,830
we trust the offers and we can close this welcome screen and

11
00:00:38,830 --> 00:00:41,043
also maximize we VS code.

12
00:00:42,340 --> 00:00:46,240
So now we are inside vs. Code, nothing new to you.

13
00:00:46,240 --> 00:00:48,650
And in a year we could, for example,

14
00:00:48,650 --> 00:00:52,790
we'll create a new file and call it well,

15
00:00:52,790 --> 00:00:56,520
simply test dot text, just to get started.

16
00:00:56,520 --> 00:00:58,940
As I said, at the beginning of this module,

17
00:00:58,940 --> 00:01:00,620
this is a web of course.

18
00:01:00,620 --> 00:01:04,420
So we will look at it from a web developer perspective,

19
00:01:04,420 --> 00:01:07,770
but we can use skit to basically track will anything.

20
00:01:07,770 --> 00:01:12,140
This could be CSS files, JavaScript files, HTML files.

21
00:01:12,140 --> 00:01:14,530
This could be text files, XL files.

22
00:01:14,530 --> 00:01:18,440
So basically anything therefore here in this module,

23
00:01:18,440 --> 00:01:22,320
I'll mainly focus on two text files because it's all about

24
00:01:22,320 --> 00:01:26,700
this skit file tracking logic that we have to understand.

25
00:01:26,700 --> 00:01:30,100
If you apply this logic then to code protects files or

26
00:01:30,100 --> 00:01:32,290
anything else, doesn't play a big role.

27
00:01:32,290 --> 00:01:33,123
Still.

28
00:01:33,123 --> 00:01:37,160
We keep it generally inside the web development world.

29
00:01:37,160 --> 00:01:40,133
Therefore we can add this test dot text file,

30
00:01:41,300 --> 00:01:43,300
and then there, I could now add something.

31
00:01:43,300 --> 00:01:48,300
This is my first commit. For example,

32
00:01:48,570 --> 00:01:52,150
you learned in the fury module that a commit is basically a

33
00:01:52,150 --> 00:01:56,113
code snapshot. Let me maybe make this a bit bigger for you.

34
00:01:56,970 --> 00:02:01,760
Okay? So let's save this and now I want to manage this code.

35
00:02:01,760 --> 00:02:03,760
This text file via get,

36
00:02:03,760 --> 00:02:06,810
and this should be stored as snapshot at the moment.

37
00:02:06,810 --> 00:02:09,750
This is just a safe text file on the machine,

38
00:02:09,750 --> 00:02:13,400
which doesn't help me too much to use it.

39
00:02:13,400 --> 00:02:16,730
Now we need to use the terminal or do command prompt on

40
00:02:16,730 --> 00:02:20,820
windows and envious code. We have a great feature,

41
00:02:20,820 --> 00:02:24,000
which is an implemented terminal.

42
00:02:24,000 --> 00:02:27,380
This is something we as code chips with by default.

43
00:02:27,380 --> 00:02:32,380
And you can find us if you go to view appearance and then in

44
00:02:33,130 --> 00:02:37,620
here show panel, if we click onto this, right,

45
00:02:37,620 --> 00:02:40,620
maybe make it a little bit smaller like that.

46
00:02:40,620 --> 00:02:42,290
Then you see that down here,

47
00:02:42,290 --> 00:02:46,660
we have the integrated terminal and this terminal

48
00:02:46,660 --> 00:02:49,950
automatically navigates into this folder. You see,

49
00:02:49,950 --> 00:02:53,750
get basics is the folder name we used here.

50
00:02:53,750 --> 00:02:54,830
Now in this terminal,

51
00:02:54,830 --> 00:02:58,720
you can see that we have here on the Mac D shell activated.

52
00:02:58,720 --> 00:03:01,080
You can this over here and here,

53
00:03:01,080 --> 00:03:04,160
you could also switch to another shell. For example,

54
00:03:04,160 --> 00:03:05,428
the Basher,

55
00:03:05,428 --> 00:03:08,330
then you won't be able to switch between these two shelves

56
00:03:08,330 --> 00:03:10,390
by clicking right here or right there.

57
00:03:10,390 --> 00:03:13,160
We'll just use these that shell in here or the command

58
00:03:13,160 --> 00:03:14,160
prompt on windows.

59
00:03:14,160 --> 00:03:17,210
So windows users please select the CMD here.

60
00:03:17,210 --> 00:03:20,010
And therefore we can select the other one by clicking onto

61
00:03:20,010 --> 00:03:21,393
this weld trash icon.

62
00:03:23,070 --> 00:03:23,903
With that,

63
00:03:23,903 --> 00:03:27,830
we have to integrate a terminal navigated into D current

64
00:03:27,830 --> 00:03:31,800
folder here and now I want to manage this first text file

65
00:03:31,800 --> 00:03:36,800
while I get for this, we have to initialize our repository.

66
00:03:37,040 --> 00:03:39,890
You remember from the free slide that we have a working

67
00:03:39,890 --> 00:03:44,030
directory, which would be our text pile and a repository,

68
00:03:44,030 --> 00:03:48,480
which would be the tracking part git internally does.

69
00:03:48,480 --> 00:03:51,230
And to bring both of these things to life,

70
00:03:51,230 --> 00:03:54,410
we have to initialize a good repository.

71
00:03:54,410 --> 00:03:57,053
We have to initialize the skid project.

72
00:03:58,100 --> 00:04:01,960
This works with a git command and just S get dash dash

73
00:04:01,960 --> 00:04:03,960
version. We also have to add,

74
00:04:03,960 --> 00:04:05,960
git first to tell our machine,

75
00:04:05,960 --> 00:04:08,230
that we want to run a git command

76
00:04:08,230 --> 00:04:12,840
And the command to initialize a repository is simply get in

77
00:04:14,109 --> 00:04:17,190
it with this in place and confirmed with enter.

78
00:04:17,190 --> 00:04:20,839
You get some hints here about the naming convention of the

79
00:04:20,839 --> 00:04:23,948
master branch. I explained that on the fury slide,

80
00:04:23,948 --> 00:04:28,180
the master branch is basically the core location of all our

81
00:04:28,180 --> 00:04:31,860
code snapshots of all our commits.

82
00:04:31,860 --> 00:04:35,810
By default, this branch is called master nowadays.

83
00:04:35,810 --> 00:04:39,180
We also use main for the master branch, for example,

84
00:04:39,180 --> 00:04:40,900
and if we want to,

85
00:04:40,900 --> 00:04:44,210
we could rename this branch with this command here,

86
00:04:44,210 --> 00:04:47,589
get branch dash M and then apply a new name.

87
00:04:47,589 --> 00:04:52,050
We'll dive into renaming branches a bit later in this module

88
00:04:52,050 --> 00:04:54,890
when we understood what branches are in detail.

89
00:04:54,890 --> 00:04:57,680
Therefore, the only thing we have to do right now is, well,

90
00:04:57,680 --> 00:04:58,950
basically nothing.

91
00:04:58,950 --> 00:05:02,220
We can just continue by adding our first commit.

92
00:05:02,220 --> 00:05:07,220
Now for this I'll first clear my terminals on here to add

93
00:05:07,990 --> 00:05:12,990
more space and we can also drag this up a bit and now we can

94
00:05:14,029 --> 00:05:18,260
run another good command to see that this is a project

95
00:05:18,260 --> 00:05:22,283
managed by git now. And this command is called, get status,

96
00:05:23,740 --> 00:05:25,020
with git status.

97
00:05:25,020 --> 00:05:29,640
We see well information about our current git project.

98
00:05:29,640 --> 00:05:32,610
We see that we are in the so-called master branch.

99
00:05:32,610 --> 00:05:33,443
As I said,

100
00:05:33,443 --> 00:05:37,170
this is something we'll explore a bit later in this module.

101
00:05:37,170 --> 00:05:39,180
We don't have any commits yet.

102
00:05:39,180 --> 00:05:43,380
So we don't have any code snapshot saved at this stage.

103
00:05:43,380 --> 00:05:46,230
And we have untracked files.

104
00:05:46,230 --> 00:05:47,890
Now, what is this now?

105
00:05:47,890 --> 00:05:52,890
Well git, it's all about file tracking and tracking changes.

106
00:05:52,930 --> 00:05:57,840
I just told you in the fury lecture that if you add a file

107
00:05:57,840 --> 00:06:00,960
to a certain committee the first time. So in our case,

108
00:06:00,960 --> 00:06:04,480
if this text file should become part of our first code

109
00:06:04,480 --> 00:06:06,720
snapshot that we store,

110
00:06:06,720 --> 00:06:11,510
then we first have to tell it that this file and changes of

111
00:06:11,510 --> 00:06:13,890
this file should be tracked.

112
00:06:13,890 --> 00:06:16,653
And afterwards the snapshot can be saved.

113
00:06:17,550 --> 00:06:20,250
The idea behind that is that, well, you first have to tell,

114
00:06:20,250 --> 00:06:23,090
good, please include this, this and that file.

115
00:06:23,090 --> 00:06:25,850
For example, in my next code snapshot,

116
00:06:25,850 --> 00:06:29,091
and then save the code snapshot because you might want to

117
00:06:29,091 --> 00:06:33,110
exclude some files or some changes of some files in their

118
00:06:33,110 --> 00:06:34,370
specific snapshot.

119
00:06:34,370 --> 00:06:37,930
Therefore you can explicitly tell it which files should be

120
00:06:37,930 --> 00:06:39,350
tracked and therefore,

121
00:06:39,350 --> 00:06:43,633
which are eligible to become part of the next code snapshot.

122
00:06:44,780 --> 00:06:47,160
Now, this sounds a bit strange at this stage,

123
00:06:47,160 --> 00:06:51,630
but if we now simply run, git, add,

124
00:06:51,630 --> 00:06:54,940
and now refer to the file that we want to add the fly that

125
00:06:54,940 --> 00:06:56,250
should be tracked.

126
00:06:56,250 --> 00:07:01,250
Then we can simply add git add test dot.text by running this

127
00:07:02,410 --> 00:07:06,740
command enter, you see nothing changes at first sight,

128
00:07:06,740 --> 00:07:09,820
but now this file is a tracked file.

129
00:07:09,820 --> 00:07:14,370
And therefore this file was added to the so-called staging

130
00:07:14,370 --> 00:07:15,990
area.

131
00:07:15,990 --> 00:07:19,560
The staging area is the area Birgit sees.

132
00:07:19,560 --> 00:07:24,440
The developer wants to include this file or changes applied

133
00:07:24,440 --> 00:07:27,890
to this file in the next snapshot. That should be stored.

134
00:07:27,890 --> 00:07:29,780
That's basically the staging area.

135
00:07:29,780 --> 00:07:33,000
So it's in between our working directory and the commit that

136
00:07:33,000 --> 00:07:35,020
we want to create.

137
00:07:35,020 --> 00:07:40,020
If we run git status, once again like this, you'll see,

138
00:07:40,860 --> 00:07:44,060
we basically have the same information that we saw before we

139
00:07:46,009 --> 00:07:47,851
are in the master branch. We don't have any commits yet,

140
00:07:47,851 --> 00:07:49,860
but now we have changes to be committed.

141
00:07:49,860 --> 00:07:54,860
And now this red file name here became green because now git

142
00:07:55,039 --> 00:07:59,330
tracks. This file and change is applied to this file.

143
00:07:59,330 --> 00:08:02,790
And therefore we can now add this file to our first

144
00:08:02,790 --> 00:08:04,400
snapshot.

145
00:08:04,400 --> 00:08:06,210
Let me clear this now.

146
00:08:06,210 --> 00:08:10,200
And let's now create this first snapshot. And as I said,

147
00:08:10,200 --> 00:08:12,990
snapshots and get are called commits.

148
00:08:12,990 --> 00:08:17,710
Therefore we can not run, git commit.

149
00:08:17,710 --> 00:08:22,330
And now dash M this will simply allow us to add this commit

150
00:08:22,330 --> 00:08:25,400
message. I also showed you on the fury slide.

151
00:08:25,400 --> 00:08:27,890
So here in quotation marks,

152
00:08:27,890 --> 00:08:31,623
we now add what we changed or what we did to this file.

153
00:08:32,950 --> 00:08:37,950
In our case, we can simply say added test.text file,

154
00:08:38,260 --> 00:08:41,409
for example, and with enter,

155
00:08:41,409 --> 00:08:46,130
we can run this command and then we get some additional

156
00:08:46,130 --> 00:08:47,590
information here.

157
00:08:47,590 --> 00:08:50,550
If you never worked with git before,

158
00:08:50,550 --> 00:08:55,420
then you should specify the user name and the user.

159
00:08:55,420 --> 00:08:59,860
Email of the person that created this commit.

160
00:08:59,860 --> 00:09:02,290
If you're working alone on your project,

161
00:09:02,290 --> 00:09:04,620
this doesn't make a very big difference.

162
00:09:04,620 --> 00:09:08,130
But if you collaborate on a bigger project, for example,

163
00:09:08,130 --> 00:09:11,840
on GitHub, which we'll explore a bit later in this module,

164
00:09:11,840 --> 00:09:16,540
then it's crucial to see who created a specific commit who

165
00:09:16,540 --> 00:09:19,160
changed the code otherwise? Well,

166
00:09:19,160 --> 00:09:21,610
if everybody could just add commits,

167
00:09:21,610 --> 00:09:25,330
could just change the code without adding any kind of hint

168
00:09:25,330 --> 00:09:28,810
who did that. Well, this would lead to big chaos.

169
00:09:28,810 --> 00:09:32,153
Therefore it's important to add our credentials here.

170
00:09:33,280 --> 00:09:36,690
You can also find a command in here.

171
00:09:36,690 --> 00:09:41,400
The git config dash dash global dash dash edit command.

172
00:09:41,400 --> 00:09:43,973
And we can also run this together now.

173
00:09:45,340 --> 00:09:49,049
And in here, you cannot see, well, in my case,

174
00:09:49,049 --> 00:09:52,430
two types of information at the bottom below this,

175
00:09:52,430 --> 00:09:55,470
please adapt an uncommon to following lines.

176
00:09:55,470 --> 00:10:00,010
You can see the default name and email that get created for

177
00:10:00,010 --> 00:10:01,100
my computer,

178
00:10:01,100 --> 00:10:05,820
for my user account here above you can see my individual

179
00:10:05,820 --> 00:10:08,470
configuration that I added. So manual Lawrence,

180
00:10:08,470 --> 00:10:13,430
and then this dummy@academy.com email address.

181
00:10:13,430 --> 00:10:18,380
Now editing the credentials in here is generally possible,

182
00:10:18,380 --> 00:10:21,470
but we are using the wrong editor at the moment.

183
00:10:21,470 --> 00:10:24,400
We would have to link well, this part of git.

184
00:10:24,400 --> 00:10:28,770
So to say to we as code in our case, to be able to add it,

185
00:10:28,770 --> 00:10:32,310
the credentials in here, we have another option though,

186
00:10:32,310 --> 00:10:34,440
to add it, our name and email,

187
00:10:34,440 --> 00:10:39,440
therefore we'll first leave this menu with escape, colon,

188
00:10:39,850 --> 00:10:43,130
and X. This seems to be a bit awkward,

189
00:10:43,130 --> 00:10:47,670
but it's the well default key combination to access this

190
00:10:47,670 --> 00:10:52,670
menu. So escape, colon and X, by confirming this with enter,

191
00:10:53,540 --> 00:10:56,140
we are back in the terminal.

192
00:10:56,140 --> 00:10:58,993
You can ignore the fact that the information about the

193
00:11:00,051 --> 00:11:02,430
credentials is no longer displayed in my case here,

194
00:11:02,430 --> 00:11:04,520
because we talked about this already.

195
00:11:04,520 --> 00:11:05,680
What's important now, though,

196
00:11:05,680 --> 00:11:10,130
is that we can individually access the username and the user

197
00:11:10,130 --> 00:11:12,950
email, and also edit it.

198
00:11:12,950 --> 00:11:15,867
We can do this with another good command and this command is

199
00:11:15,867 --> 00:11:19,760
git config. As we just had it before,

200
00:11:19,760 --> 00:11:24,160
this allows us to change the git configuration in our case

201
00:11:24,160 --> 00:11:26,940
to git user configuration.

202
00:11:26,940 --> 00:11:31,150
Then we again enter dash dash global global here simply

203
00:11:31,150 --> 00:11:33,793
means that the credentials I add now,

204
00:11:34,752 --> 00:11:38,750
or I added now are added for this user account on all good

205
00:11:38,750 --> 00:11:40,940
projects on this computer.

206
00:11:40,940 --> 00:11:44,360
You could also set credentials for all users on a machine.

207
00:11:44,360 --> 00:11:45,410
For example,

208
00:11:45,410 --> 00:11:49,790
typically that global user on a specific machine is the way

209
00:11:50,832 --> 00:11:51,890
to go though. And now our space,

210
00:11:51,890 --> 00:11:56,890
and now we enter user.name with this. If we just hit enter,

211
00:11:58,010 --> 00:12:01,760
we see the current username that is added in Mike has manual

212
00:12:01,760 --> 00:12:05,940
Lawrence, or if you want to change it, you could just run,

213
00:12:05,940 --> 00:12:10,730
git config dash dash global user.name again,

214
00:12:10,730 --> 00:12:12,460
and now in quotation marks,

215
00:12:12,460 --> 00:12:16,100
because if you want to add a first and a second name,

216
00:12:16,100 --> 00:12:18,280
like in my case manual Lawrence,

217
00:12:18,280 --> 00:12:21,020
which won't make a difference obviously, but with this,

218
00:12:21,020 --> 00:12:24,313
we could update the username here. So let's do this.

219
00:12:25,150 --> 00:12:27,160
And now besides the username,

220
00:12:27,160 --> 00:12:30,990
we should also check or edit it. Our user email.

221
00:12:30,990 --> 00:12:33,550
It's basically the same git command here.

222
00:12:33,550 --> 00:12:37,660
We use git config dash dash global,

223
00:12:37,660 --> 00:12:41,920
and now user.email here.

224
00:12:41,920 --> 00:12:45,250
You can now add the email address that should be displayed

225
00:12:45,250 --> 00:12:46,380
in your commits.

226
00:12:46,380 --> 00:12:50,020
You can do this within or without quotation marks.

227
00:12:50,020 --> 00:12:53,680
I'll add the email address also inside quotation marks here

228
00:12:53,680 --> 00:12:57,000
and there are used well dummy@academy.com.

229
00:12:57,000 --> 00:13:00,843
Make sure to use your own individual email here, though,

230
00:13:02,050 --> 00:13:04,870
with this. If we run the command, once again,

231
00:13:04,870 --> 00:13:07,520
without the email address added at the end,

232
00:13:07,520 --> 00:13:11,563
we should see that now this updated email is this displayed.

233
00:13:13,060 --> 00:13:15,520
So these are our credentials now,

234
00:13:15,520 --> 00:13:18,422
but what about this commit this code snapshot now.

235
00:13:18,422 --> 00:13:19,560
Well,

236
00:13:19,560 --> 00:13:23,900
let me clear this again and to see whether a commit was

237
00:13:23,900 --> 00:13:27,610
created successfully while we have two options,

238
00:13:27,610 --> 00:13:30,150
the first option would be to, again, run,

239
00:13:30,150 --> 00:13:32,483
git status in here.

240
00:13:33,660 --> 00:13:36,513
There we see you. We have nothing to commit.

241
00:13:38,763 --> 00:13:39,610
Our working tree is clean. This means, well,

242
00:13:39,610 --> 00:13:44,610
somehow our snapshot was saved. Obviously, besides that,

243
00:13:44,680 --> 00:13:48,350
we also have another command git log,

244
00:13:48,350 --> 00:13:53,130
which gives us an overview of all commits inside our master

245
00:13:53,130 --> 00:13:55,640
branch. Here with this command,

246
00:13:55,640 --> 00:13:58,880
we can see that the commit was created successfully.

247
00:13:58,880 --> 00:14:03,010
And by the way, with the initial credentials you had,

248
00:14:03,010 --> 00:14:03,870
in my case,

249
00:14:03,870 --> 00:14:06,610
I just showed you how you can change the credentials,

250
00:14:06,610 --> 00:14:09,540
but the credentials were the same. So in your case,

251
00:14:09,540 --> 00:14:13,170
you should see your initial credentials that get added by

252
00:14:13,170 --> 00:14:14,520
default.

253
00:14:14,520 --> 00:14:16,220
Now being creating another commit.

254
00:14:16,220 --> 00:14:18,520
You should see the updated credentials.

255
00:14:18,520 --> 00:14:21,340
We'll do this in a few seconds in here.

256
00:14:21,340 --> 00:14:24,380
You can also see some additional information.

257
00:14:24,380 --> 00:14:27,040
The first one here is this commit ID.

258
00:14:27,040 --> 00:14:30,730
Each single commit you create and git has a unique ID,

259
00:14:30,730 --> 00:14:35,630
which allows you to exactly identify this specific commit.

260
00:14:35,630 --> 00:14:37,590
Here. We have to offer information.

261
00:14:37,590 --> 00:14:39,133
We talked about this already here.

262
00:14:39,133 --> 00:14:42,190
We have the date when this commit was created.

263
00:14:42,190 --> 00:14:43,100
And down here,

264
00:14:43,100 --> 00:14:46,840
we have the commit message that we added when saving that

265
00:14:46,840 --> 00:14:48,083
code snapshot.

266
00:14:49,370 --> 00:14:53,820
So this is our first commit and also our edited credentials.

267
00:14:53,820 --> 00:14:57,510
Now we could also create another commit and another code

268
00:14:57,510 --> 00:15:02,020
snapshot for this I'll stay within the file.

269
00:15:02,020 --> 00:15:04,880
So within the track file that we had to,

270
00:15:04,880 --> 00:15:09,270
well add some text in here, let's say,

271
00:15:09,270 --> 00:15:14,270
and here we go with commit number

272
00:15:16,400 --> 00:15:18,000
two, for example.

273
00:15:18,000 --> 00:15:19,330
And besides this,

274
00:15:19,330 --> 00:15:22,910
don't forget to save this in here besides this.

275
00:15:22,910 --> 00:15:27,890
I will not also create another text file and call it maybe

276
00:15:29,270 --> 00:15:34,270
second commit dot text, and I'll keep it empty.

277
00:15:35,210 --> 00:15:38,570
It's just about creating this new text file.

278
00:15:38,570 --> 00:15:42,483
And if we now, again, run, git status in here,

279
00:15:44,490 --> 00:15:49,490
then you see, well, two different types of information.

280
00:15:49,680 --> 00:15:52,410
First, you see that we have changes,

281
00:15:52,410 --> 00:15:54,660
not staged for the commit.

282
00:15:54,660 --> 00:15:56,930
And there you can also find which changes.

283
00:15:56,930 --> 00:16:01,930
This refers to it refers to the modifications in our tracked

284
00:16:01,930 --> 00:16:03,370
file,

285
00:16:03,370 --> 00:16:07,280
because with adding our test dot text file to the staging

286
00:16:07,280 --> 00:16:11,580
area, as part of our first commit, we kind of told,

287
00:16:11,580 --> 00:16:12,413
git that well,

288
00:16:12,413 --> 00:16:16,190
it should monitor this file and change as applied to this

289
00:16:16,190 --> 00:16:20,670
file because the other information we have is, again,

290
00:16:20,670 --> 00:16:23,000
this untracked files information,

291
00:16:23,000 --> 00:16:25,880
which now refers to this newly created file.

292
00:16:25,880 --> 00:16:30,010
Second commit dot text was not part of the first commit.

293
00:16:30,010 --> 00:16:33,410
Therefore get tells us, Hey, you edit a new file.

294
00:16:33,410 --> 00:16:37,120
What about this file? Should I add this to the staging area?

295
00:16:37,120 --> 00:16:39,330
And therefore also track this file.

296
00:16:39,330 --> 00:16:42,950
And later on change as applied to this file,

297
00:16:42,950 --> 00:16:47,000
we want to include both of these changes in our next

298
00:16:47,000 --> 00:16:49,450
snapshot. And for this, we have two options.

299
00:16:49,450 --> 00:16:54,140
Now, the first option would be to again, run git add.

300
00:16:54,140 --> 00:16:57,913
And now we refer to the first file. So test.txt,

301
00:16:59,902 --> 00:17:02,010
test.txt with the updated information,

302
00:17:02,010 --> 00:17:04,800
then a space and then the second file name.

303
00:17:04,800 --> 00:17:09,710
So second commit dot text.

304
00:17:09,710 --> 00:17:12,400
This would be possible and totally valid,

305
00:17:12,400 --> 00:17:16,420
but in cases where you added multiple files and name changes

306
00:17:16,420 --> 00:17:20,359
to other files, well, this can be a bit cumbersome.

307
00:17:20,359 --> 00:17:24,680
Therefore we have a command to add all untracked files to

308
00:17:24,680 --> 00:17:25,940
the staging area,

309
00:17:25,940 --> 00:17:29,780
and to also add all changes made to track files to the

310
00:17:29,780 --> 00:17:34,780
staging area. This command is simply git add now a space,

311
00:17:35,180 --> 00:17:38,830
and now a dot, why running this command?

312
00:17:38,830 --> 00:17:42,410
We can now add a commit message. So you run again,

313
00:17:42,410 --> 00:17:46,930
get commit dash M for example,

314
00:17:46,930 --> 00:17:51,930
changed test dot txt and added second

315
00:17:53,800 --> 00:17:55,533
commit dot txt.

316
00:17:56,490 --> 00:17:57,663
If we run this,

317
00:17:58,600 --> 00:18:02,020
we see behalf two files changed and by again,

318
00:18:02,020 --> 00:18:07,020
checking our statues, you'll see everything is all right.

319
00:18:07,290 --> 00:18:10,543
And by checking our commit log, once again,

320
00:18:11,500 --> 00:18:15,780
we see that we now have two commits again with the commit

321
00:18:15,780 --> 00:18:19,633
message and again, with, for new unique ID.

322
00:18:21,170 --> 00:18:24,910
So this is how you can initialize a good repository,

323
00:18:24,910 --> 00:18:27,990
how you can change your credentials and how you can create

324
00:18:27,990 --> 00:18:30,960
commits inside such a repository.

325
00:18:30,960 --> 00:18:34,870
And also inside a specific branch.

326
00:18:34,870 --> 00:18:38,870
We talked about branches on the slide already. And in here,

327
00:18:38,870 --> 00:18:42,520
we are always on this master branch,

328
00:18:42,520 --> 00:18:45,910
therefore with the basics about commits out of the way,

329
00:18:45,910 --> 00:18:49,363
let's now dive into this branches topic.

