So, I'm gonna launch Pycharm,
and kind of throw that in the background because we're going to get more in to
GIT at this point.
I'm must going to close this actually.
So, now let's talk about GIT
GIT is a great tool
if you
work in a team. If you're working on large projects. Or if you're working on
open source projects.
GIT allows multiple people to work in the same files or the same project
at the same time,
And it is pretty smart at letting you control, you know,
If there is merge conflicts, what exactly to do.
And a merge conflict is basically when the same block of code is edited
or modified by more than one person.
And since it's up to the server
there's going to be merge conflicts,
and you can sort those out
and we're gonna go through that.
So, first thing we need to do is install GIT.
So, again,
Terminal.
sudo apt-get install
git
git-extras
and the reason whey we're adding GIT extras as well as GIT
is that GIT extras gives us a little more control. And we're going to go over some
of the things in the GIT extras package
as well,
in terms of what certain commands
do in Git.
Alright, so once the installation of GIT is completed,
I'm going to actually go into Pycharm
directory for the project I just created.
So, I'm going to...
I think I'm going to put it into Pycharm projects, so,
Let's go in here.
and I named it Pi, so I'm going to change directory to Pi
and we see our files here.
So, what I'm going to do is initialize a GIT repository here.
So, I'm gonna type GIT
init
and it is an empty repository at this point.
It has no information, it doesn't know, where it is supposed to sync up to.
So, what we need to do at this point is
go into our web browser
and get over to GIThub.com
and we'll create a repository
for this project.
So, on GitHub, if you don't have an account, just sign up.
if you do sign in,
and when you're signed in, in the top, right here, you got this little plus sign,
You're gonna click that.
And click new repository.
And here, you're gonna give it a name.
So, I'm just going to name it the same as my project. Actually, I'm just going to
name it Python-pi-example
and we're going to initialize the repository
with the README.
So we can automatically pull right from the Git code.
So, here is the repository, and here is the URL for the repository.
So, just click in here.
Control+C to copy and comeback over to this terminal
and we're going to run git remote add origin
and then paste the
what we just copied from
the GitHub page.
So, this is basically how to tell our local repository
where its remote origin is.
And that's the repository that you see on the background in Chrome.
So, we're going to hit Enter here.
If you don't get a confirmation, that means
it all worked well!
If you get an error, just try and follow the error message as close as you can.
And see if
you can get at it.
The git URL to add an origin always ends in .git
So, pay attention to that as well.