all right you're right you're right II
now that we can add files I'm gonna
teach you how to edit them and that is
the end of the song but hope you guys
liked it just a little freestyle I'm
working on working on my rap game a
little bit but uh anyways let's uh go
ahead and get on with the tutorial so as
I said now that we can add files let's
go ahead and learn how to edit them so
open up your a notepad editor whatever
editor you have and say our boss looked
at this and he's like you know what
Bucky this file is freaking gold but
give it a little more exists a little
more jazz that's the only thing my boss
ever tells me so I'm like okay let me
just type I am a ham and some people
call me Sam it doesn't really freaking
matter what changes you make
I'm just wanna I just want to explain to
you guys that whenever you save this
well go ahead and make change to a file
and then save it and now this file on
our computer is different than the file
in our repository because in the
repository it still has that main file
so how do we tell git hey listen up get
you better recognize that this is the
file that we want in our main project
now this new edited file so you know we
can't just you know talk to it like that
we actually have to tell it through this
little git bash program right here so
how do we do that well the first thing
that we can do is type to get status and
hit enter and it says ok this is what's
going on right now I realize that you
modified this file first text so we're
like yeah we did so now how do we get it
to the repository so everything is good
to go still well what we do is we type
git add and then we took the name of the
file and hit enter now what this is
going to do if we tell you git status is
it added it
let me scroll down a little bit here it
added it to the staging area so now that
new modified file is ready to be
committed to our main repository and of
course to do that we just make a little
commit and be like modify the first file
hit enter and it set our a1 file change
one insertion and it says one deletion
because what it the weight get viuda is
you pretty much instead of just editing
a file it inserted a new one and deleted
the old one so you know it's kind of the
same thing so now if we type get status
hit enter nothing to commit working
directories clean and what this means is
the files on our computer are the same
as the one in our repository so that is
how you edit a file so now let's go
ahead and just open up these ones 2nd
and 3rd and uh changes to 2nd and
changes to 3rd and now I want to show
you guys arm of course how to pretty
much do it with more than one files
because typically whenever you're
working with the project you're going to
be editing a bunch of files before you
make your final commit so this is how
you do that
so of course right now we just edited
the second and third so now let me
scroll down right here type git status
enhancer and it says Bucky you modified
second and third basically the files
second and third on your computer are
different than the ones in the
repository so now what we need to do is
we can go ahead and press get add period
and whenever we hit enter it adds all of
the modified files to the staging area
as we can see right here so this is how
we can do it again get at a period
whenever we have multiple files and now
of course get commit this is how you
malas but how you can edit multiple
files hit enter boom
two insertions two deletions pretty much
two files were changed and we can verify
that by typing get status and they said
nothing to commit our working directory
is clean so ladies and gentlemen that is
how you edit files and pretty much get
your new version in the main git
repository so thank you thanks for
watching I'm going to go work on my rap
game a little bit because I don't think
I haven't nailed quite yet I'll see you
guys in the next video