The next GitHub feature will cover our gists, so GitHub gists are a very simple way to share code snippets.
If you're familiar with something called Pastebin, it's a very similar tool.
It allows you to basically copy some code into agist and then save that and share it with other people
or refer back to it later.
You don't have access to all the GitHub repo features, but you have access to some of them, like forking,
for example.
So I'll just demonstrate it first to access.
Just not over there.
Over here.
If you go to GitHub, I go to just GitHub Dotcom.
Now, I'm sure there's a button somewhere.
I think it's actually if we go here to your profile and then your gists, I think that's the easiest
way to get there.
Maybe there's another way without just typing gists, dot, GitHub, dotcom.
So it's a different page, right?
We see my personal list of gists.
Actually, I don't use them very frequently on this account.
Most of these are from when I was teaching lectures.
But I could just show you one.
Let's say here are some exercise I made for students.
So this is an HTML file.
OK, so there's this HTML file, I don't remember what this exercise was, but I was asking students
to do, but there's the ability to leave comments.
I can personally delete this file or edit this file.
I can download it.
I can share it with people.
They can it and starret.
So I'll show you if I go to all allergist's.
I can see a discovery page, so these are gists that other people have made, so they range from markdown
files like I don't know exactly what this is.
It looks like some sort of checklist for turning in work, maybe on GitHub.
So there's whoever this person is made that just in its public.
But here's another one.
This looks like some sort of iOS script.
So here's a swift script, there's two files which you can do and then you can make private just as
well.
So I use these when I'm teaching to share stuff, but you'll see them occasionally.
I can read it or different Web pages.
People will share code this way, a full GitHub repository where you have to push up and, you know,
set up your remotes.
And all of that can be annoying.
This you can do very easily.
So if I want to make a new just, it's just a matter of clicking the plus sign here and then I enter
a file name.
So what do I want to share with somebody or what do I want to store in agist?
Well, actually, here's a gist I've been using personally as I'm making this course where I've set
up my computer to have two different GitHub accounts.
And it's been kind of frustrating to have to switch between them.
But this is a gist that somebody made to share this person.
OK.
Oh, OK.
OK, let's see.
Oh, and when I'm very sorry, I'm sure I completely butchered that.
Anyway, this just talks about having multiple GitHub accounts, wanting to use them both on the same
computer, how to set up your SSL config file, which is exactly what I did.
I followed these instructions how to add the two private keys, how to test your connection, and then
it allows people to discuss and post about their error messages or other suggestions.
So this is very, very useful.
It could have been a full fledged GitHub repo with just one file in it, but it just is more appropriate.
So if I wanted to just try recreating some of this myself, this happens to be a markdown down file,
right?
So made a lot of just are marked down, but they can be any file extension.
I'm just going to copy this to show you, although with this I'm not plagiarizing his work.
OK, so I can now name this.
I'll call this, you know, I don't know, GitHub.
How about multiple.
GitHub, S.H., Dot, MD.
If I do that MD, it now highlights it as marked down and then I can choose to create a secret just
or a public gist.
I'll just create a secret one.
I can add a description of created.
And now I have this just that I can come back to at any point.
And that's pretty much all that there is to a secret.
Just so I can edit it, I can write some comments.
I can also have just, I believe, within the company that I work at and share just with people, keep
them secret so they're not public facing but have collaborators I can edit.
But that's just the raw I can edit this way.
I can even add files so I could add some other file, like a JavaScript file and it will highlight it
as JavaScript.
Hopefully you can see that.
I guess it's a bit small.
There you go.
So it's getting JavaScript syntax highlighting and that's kind of all that there is to gists.
So this one, again, is secret.
It's private, but I could make a new gist instead.
Just make it public here and anybody could see that on my account and anybody can see anybody else's
public.
Just as you saw here, there's this discovery feature.
I never, ever really use this, I guess, except for this video where I'm showing you it.
It's pretty rare that I just want to stumble across random gists anyway.
That's all there is to GitHub.
Gist You can have multiple files, different file types, different extensions.
You can share them, you can keep them secret.
They are, I believe, behind the scenes actual git repositories, although they don't expose the same
features on GitHub that we normally have access to with a full fledged repo.
But we can see revisions, we can see diffs.
So there is a history here, but they're just very slimmed down.
The actual interface is very streamlined compared to a full GitHub repository.
So that about wraps it up for GitHub gists.