Let's launch WebStorm.
So, I'm going to show you guys something else here.
Just a quick
little demonstration.
Actually,
I like to do this in Pycharm
Here.
It doesn't
kill it by the term Pycharm, I'm going to have to kill all Java
processes.
sudo killall java
Alright. Now I'm going to run Pycharm again.
I have noticed that Pycharm sometimes bricks up
and I'm not sure why.
and I'm not sure if it's just an incompatibility with my system,
The other Jet Brains
IDEs work fantastically.
Native file watcher is not executable. Maybe that's the whole issue there.
I'm not sure.
So, what I'm going to do
is add that. I'm going to initialize
version control here. Right in
my IDE.
So,
what I'm going to do is
is go to view
Tool Windows,
Version Control.
And we can see that I've got one file changed and so,
Jet Brains IDEs are really smart,
they just kind of just plug right in to version control.
So, if I change files, let's say, I
make a change here,
I'll see that in
the default local changes. Two of these are at it here.
These are all the files that have changed. So, if I right click,
got to commit changes.
The Commit Message is going to be
Newest commit.
and hover over this button,
you can either commit and continue working to make more commits, or you can commit
and push all at once, I'm going to commit and push
It's going to origin master
and it's pushing it, and it's going to ask for my password.
Again once in this IDE I think.
No? No, I guess it doesn't.
Oh, good!
Let me find that repository, I accidently
went back, here we go.
And we can see, Newest commit here, which I just push from the IDE, and so
IDEs make
version control
a lot different.
I'm going to create a new branch and call it,
version 01
Hit Ok.
Now, if I make changes in here,
No longer,
need
comments
and it bricked up again.
Alright.
Basically, let's say you work in branches though, so if I were to open
this file with a
g edit
and edit this
no longer
need
comments here, because it's self explanatory.
Let's
create another function
and let's just have this
print out
new
function
and we're not going to call it, I'm just going to save this
and
that does
Alright,
So now, if I
git branch
git add
-A
git commit
-m new branch
git push
origin
v01,
There we go.
So, now if I come back here,
we'll see
two branches
so, this make sense if
if
you have multiple people working on different type of features
and it's better if they work alone in a separate branch, so they don't have
to worry about the changes every one else's making to other areas of
the project that don't necessarily impact them.
Each person can have a different branch.
So, you might have a branch for specific new feature
or
what-have-you, but branches
are
pretty
simple, so, you can also merge branches back in the master.
So, now we're on a
v01
branch here.
And so, we can switch over to this branch
and we can see that it looks a bit different
because this file was changed.
with that commit. So, how do you get those commits over to the master branch?
You need to check out master branch.
so, currently we are on v01 because that's the branch
we're working in.
so run git checkout
master
and then git
push
there.
You need to merge the branch to the other first, and then run git
push
origin
master
and ifwe refresh here,
we now see that the master branch has this new commit.
So, that's how to use git in command line.
Basically, it's really simple and it's really great if you have large projects
or again if you have a team of a lot of people working on the same projects.
Thanks for watching this video,
I hope you guys found this informative and useful.