Check out a free preview of the full Everything You'll Need to Know About Git course
The "Introduction & man Pages" Lesson is part of the full, Everything You'll Need to Know About Git course featured in this preview video. Here's what you'd learn in this lesson:
ThePrimeagen introduces the course and mentions that they will not cover every single command in Git, but will focus on teaching the most important ones. He also emphasizes the importance of using the manual pages (man pages) to learn about Git commands and demonstrates how to navigate and search within the man pages.
Transcript from the "Introduction & man Pages" Lesson
[00:00:00]
>> All right, hello, is everybody ready? No, yes?
>> Yes.
>> I want more, come on, a little bit more, a little bit more.
>> Yes. There we go, all right, we're excited, there we go.
>> [APPLAUSE]
>> [LAUGH]
>> Everyone, we're gonna do a Linux chat now.
[00:00:15]
I actually heard a really great quote before all this which is, Git was only invented so that the rest of us could be nearly as smart as Linux. Because he is that good, he can hold all of Linux in his head with revisions while the rest of us are just mere mortals, so.
[00:00:29]
But for this grand course, I did want to be a bit more professional. So we're gonna undone the black hoodie and put on regular normal clothes. All right, so I just think that's fantastic. So all right, so who am I? For those that don't know, I stream on Twitch, I make YouTube videos.
[00:00:49]
I do handcrafted artisanal memes every now and then on Twitter. I don't have a link there. I made this logo with ChatGPT, it got so close. It's just so close, yet it's just so far away. Also, those ones as well are from ChatGPT, so pretty fantastic. So the goal here is to teach you Git well, it's not gonna go over every single command.
[00:01:08]
I don't know if you've ever played around with the man docs, but there's about 147 different commands you can put into Git. We'll go over 13 of them. We're gonna get pretty far into it, but the last 1% of knowing Git is extremely difficult. You don't ever have to know it, I've literally not touched most things in Git.
[00:01:28]
There's just enough to make you good, and that's where we want to be, is we want to be pretty dang good and understand why they exist. All right, so before we get, by the way, you should man. If you don't know what man is, man is the manual pages for any kind of Unix system.
[00:01:43]
So if you just jump in your terminal and type man man, you will see a bunch of manual pages appear. It's really important to be kind of good at these. You don't even have to be great at them, just kind of good, because everything you need to know about Git is for free and on your system at all times.
[00:01:58]
You don't even need the Internet. If you're on an airplane, you can just man, get whatever command and you'll read the manual page for it. So it's always fantastic to have the manual in the back pocket and just kinda know how it works. So if everyone can open up the manual for a quick second and check it out.
[00:02:14]
By the way, if you ever want to, you can always do a man, get-, press some tabs. And if you're on Zish, you'll see that it has, like I said, literally 147 possibilities there, quite fantastic. So if you have man open, and you've never used man before, j goes down a line, k goes up a line.
[00:02:31]
d goes down a half page, u goes up a half page, / or forward / any word will search for something. n goes to the next search term after you press Enter, capital N goes to the previous search term after you press Enter. So now that you see this, you probably think, okay, maybe Vim shortcuts aren't like all that crazy.
[00:02:50]
Maybe this has some precedent, you're probably right. No one knows where F came from, but the rest of it probably makes sense. All right, so quick exercise, in man pages, you see bold terms. I want someone to find what is a bold term, what is it's definition. Use the man pages, use man man to find out why a man page has bold terms.
[00:03:12]
So you can search, you can peruse
>> / bold, first result is bold text, type exactly as shown.
>> Correct, all right, so there's a bunch of different ways you got to read commands out of the man page. You'll see kind of specified with italics, with brackets, with dot, dot, dot, ellipses, all that kinda stuff.
[00:03:33]
And so when you look at a man page, everything has a meaning. And so this is just kind of your intro, if you forget how a man page works, use man man. You can go over it, you can look at it. It's always in your back pocket, fantastic to have.
[00:03:45]
And so there you go, bold text literally means to type exactly as it's shown. So if you look at the man page, you'll see something like man -k, and that shows up in all bold, and then you'll see the rest of it kind of telling you how to use it.
[00:03:57]
So that's how you use a man page, fantastic.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops