now if you've never joined us for a
category-5 community coffee break you'll
find out more about it at category-five
dot TV just scroll down on the homepage
and you'll see the community coffee
break there along with our schedule when
we're going to be doing the next one it
is a weekly event that we hold on zoom'
and it's an opportunity for our
community to come together and even
though we're all experiencing what we're
experiencing in our world today we've
taken the approach to say rather than
talking about those things the things
that are bringing us down right now
let's look at it and say look we're all
stuck in this situation what is what is
it that I'm doing that's got me excited
what is it that I'm experimenting with
technologically that is really
interesting to me and helping me to
occupy time whether I'm stuck at home
right now or whatever the case may be so
the topic came up about github because
we're talking about programming and
Peter is there almost every time for a
community coffee break and Peter was
asking well how do you use github well
not really they the something that we
can show or talk you know walk you
through on the coffee break but it came
up that hey well that would be a really
good topic to discuss on category five
technology TV and the reason that it
came up initially is because when
Microsoft bought github they kept it
going kind of status quo as it was and
you had to pay for certain features but
then suddenly very recently Microsoft
said and all those paid for features not
all of them but a lot of those paid for
features that you used to have to pay
for are now free so they're they're
taking the service and they're basically
giving away their premium service
absolutely free at github com so what's
github well github is kind of like a
cloud service provider for yet it's for
developers it helps us to be able to
manage our projects so that you can go
back in time basically with code
and it really is helpful to be able to
see those commits and see how changes
have impacted your project it's also a
great storage mechanism for your code
because you're able to share it with
other people if you want
now of course Microsoft making it free
you can now have free private
repositories as well and you can set up
as many teams as you want if you want to
collaborate with other programmers but
essentially what it does for me is it
allows me to share my code online in
such a way that other people can use it
open source they can compile it or use
it or run it on their own computers and
then if they decide oh well I'd rather
it work this way or maybe here's a bug
and I can fix that they can do what's
called a pull request so basically they
clone my github repository my software
code they fix it on their computer and
then they do a pull request which pushes
it back while they push it back to their
fork and then it creates a pull request
for me so that I see that hey Joe will
blow over their fix this bug with my
software I can click a button and it
will import that fix into my software so
there's a whole lot to it and it's
really it's very powerful it can be
confusing especially when you get into
squashing and merging them and those
kinds of things which we're not gonna
get into today but what I do want to
show you is how the very most basic
knowledge about how it works is going to
allow you to use github in an effective
manner think of it as that where you're
putting your code out there as open
source software and doesn't have to be
you can have it private if you want but
in my case that's what I'm doing I want
people to collaborate with me
occasionally maybe they'll post issues
if they find a bug and then I'm still
the person who has to fix it but at
least my community is coming into my
software repository and saying this is a
problem and you need to fix it all right
so github calm is where you go is sign
up for your free account all you have to
do is click on the link and click
sign up now I already have an account so
I'm gonna log in as myself
and sign in so you can see here that if
I go to my repositories so if I jump
home here and go to let it load here let
it load alright I'm just gonna go
straight to cat 5 TV is where I host all
of my my software so you go there
github.com slash cat 5 TV and you see
how this works
so you can see that I've got a ton of
software repositories and they're all
different projects all different things
that I've done or that I am continuing
to do and there's pages and pages and
pages of it so once you have your github
account you can log in to what you see
here which is my repositories list but
when you first sign up you're not going
to have all of these you need to create
your first repository so the way that
I'm going to do that now understand
github is not required forget ok and git
is not the same as github github is an
online service and think of it as cloud
storage forget ok it is not the same
thing it is a online storage for that
open-source package management tool or a
project management tool so here on
github they've made it really really
easy to simply say new repository so
I've gone to my repositories and I've
clicked on new and then I'm going to
give it a name I'm going to call this
one my underscore test and a an optional
description this is a test for the show
whether you want it to be public or
private and then initialize it with a
readme it's always best to do that it's
it makes it so that people can access it
right away including yourself you want
to add a license do you want to add a
git ignore I'm gonna leave both of those
empty you'll discover what that means in
the future and create your repository so
now I have one called my underscore test
but there's nothing there and I'm done
with the browser so now what I'm going
to do is I'm going to bring up my
terminal and in my terminal I'm going to
type
get okay so you can see that I've
already installed it if you do not have
get installed so I'm on Linux I'm on
Debian Linux here you can type apt
install git that's what you're going to
type I'm not rude sudo su logged in is
rock ok apt install yet it's gonna tell
me that I already have the current oh
there's an no no I've already got it
there are other updates for me though
but get is already the newest version so
if you do not have it you need to
install it if you're on an RPM based
system it will be yum install git and
you can also find it in your GUI
repository manager your package manager
or whatever you use like some synaptic
package manager for example so once you
have get installed make a folder
probably in your home folder and we'll
call this repositories just so that I
have a place where I always know that my
code is right so this is going to be a
local copy of my git repository so now
I'm going to type git clone and we're
gonna copy this URL github.com slash cat
5 TV slash my underscore test so I can
copy that just with ctrl C you're gonna
get used to just typing it it's your
user name slash your repository and now
so if I look at my file system so it's
cloned get clone and then the name of
the or the URL of the repository so now
if I go to my home folder and then into
repositories notice it's owned by root
because I see super user dude to sue so
now there's a folder called my test and
within my test there's a file called
readme MD so within this folder so I'm
going to go into my test and I want to
create a new file I'm going to call this
nano test dot SH and we'll create a
quick SH file to run a bash script and
I'm going to type echo
hi there how's that oh I should really
stick with the the norm hello world
how's that okay
so I've written that out and I've closed
it so now you see there's a file called
test dot s H now when I transfer a file
up to github the the permissions are
going to be included with that push so
if I do dot slash test dot s H you
notice it says permission denied I need
to make it executive executive all chmod
plus x test dot s H so now if I type
test dot s HS s hello world so I now
have my very first bit of script ready
to go up to github it's part of my
repository on my local computer but it's
not yet in github so if you look at
github I'm gonna refresh just to prove
it you see your file list here and
there's still just the readme ok so now
back in my terminal window I'm gonna
again use that git command I'm gonna go
get add star within the repositories
folder that's saying find any files that
have any changes and add them ok get
commit - am and then in quotes
give your commit a name so I'm gonna say
my first script and these are just short
little descriptions and hit enter and
now it's saying hey you need to tell us
who you are because you've never ever
run git on this computer before so you
need to run these two commands pretty
straightforward
get config - - global you only have to
do this once don't worry user dot email
and if you have trouble typing that just
copy it ok and then in quotes I'm going
to put Robby at category 5 TV and that's
just telling it my email address then
I'm gonna go user dot name I don't know
if you can hear that but it's actually a
really bad storm outside of our studio
today so the lights are flickering a few
times and but I think we're gonna get
through it anyways so all right
delete that and change my name to Robby
Ferguson enter ok done so I only have to
do that once so now scene
next time I run that git commit - am
it's just adding it okay
so I've added it and it sees that one
file has changed there are two
insertions and test out SH is new so
it's gonna create that so now the final
command that I need to enter is get push
origin and I'm going to specify the
master which is the branch master
so origin master and now it's going to
ask me for my username and password
which I entered when I created my
account so cat5 TV is my username and my
password I use LastPass and generate new
passwords all the time and they are
massive and crazy so I copied a password
and then I pasted it and there it goes
it's uploading that data to my
repository and it's done so f5 to
refresh and you should see the test SH
is now part of my github repository and
there it is and it shows it that it's
executive hello world so now back here
so let's just pretend I've made changes
elsewhere so on another computer and I'm
going to do this through the browser
just to show you so on this system I'm
gonna go echo hello again okay and then
I'm gonna save those changes I'm not
gonna give it a name or anything like
that description I'm just gonna confirm
so now the script looks like that so see
how I change that in the browser as well
you can do this from anywhere so now if
I look at my file locally on my computer
in the repository there we go it still
just says hello world okay so I'm gonna
go get pull again I'm doing this all
within the my underscore test folder so
git pull is going to then look for any
changes that have been made elsewhere
and pull them down to my computer so
it's always synchronizing those changes
so now if I open Nano and open that file
you can see that new hello again is now
part of that so I'm gonna show you echo
hello times three and I'm gonna save
that and now I'm going to do the exact
same thing but
show you how it's different now that
I've already entered my name and my
email address get Ad Star get commit -
am final update get push origin master
cap 5 TV is my username and my password
is a string of about 64 characters
randomly selected and I'm going to paste
that in and there we go so that's all
there is to now pushing my changes
locally to the github server so that
shares it again with everyone else or
with my other systems when I do a get
pull so by doing that I can get clomp
pardon me git clone something and it
doesn't have to be mine it can be
someone else's github repository as long
as it's public but then I can make
changes to it on my local machine and
then I can do a push now you have to own
the repository in order to do a push so
the way to make changes to someone
else's repository is to fork it so when
you go to the repository you click on
the button called fork and it basically
makes a copy of it in your own account
that you can make changes to and then
that's where you can do pull requests
but those are the basics to get you
started that's going to allow you to
create repositories upload your files
upload your code be able to manipulate
it from any system so you can test it on
a Raspberry Pi on your Windows machine
on your Linux desktop on whatever and
then push all those changes up to the
server so that they can be downloaded or
pulled to all of your systems so that's
all there is to it
[Music]