News for hackers. Stuff that matters.
Re:Git Command Explorer by recursive on Sunday October 17, 2021 @12:34AM (#28893985)
Tell me if I'm wrong.

1. Have some unix-like operating system. 2. Type `man` at a command prompt.

Is that about right? I haven't got to step 1 yet.

Re:Git Command Explorer by db48x on Sunday October 17, 2021 @01:15AM (#28894143)
If you can type “git” at a command–line prompt then you should also be able to type “man” at the same prompt.

But even if you cannot (for some unfathomable reason) git has you covered. You can type “git help foo” to open git’s man page for foo. So “git help tutorial” or “git help gittutorial” will both work.

Man pages are something that UNIX really did right. When you bought a UNIX, it came with many volumes of printed reference materials covering every detail. Every command you could type, every C library function you could call, every syscall, was documented right there in the manual on your shelf.

But they went one step further and provided the source for those manuals on the computer itself (literally, they were printed from the same troff files that the man viewer displays to you), so that you could view anything in those manuals without even taking them down off of your shelf. They’re indexed for instant retrieval and fast searches, so that there’s literally no delay when you ask for help. And they’re usually really high quality too! Sometimes they delve into jargon, or fail to spell out all of the consequences of some obscure option, but it is super rare that they leave anything out. Originally they were maintained by professional documentation writers, but these days they are lovingly maintained by volunteers who spend thousands of hours keeping them up to date.

There’s a whole education’s worth of material in there, and people just don’t use them. I can only blame learned helplessness, or Windows.

I bet you don’t know about Info either.

Re:Git Command Explorer by recursive on Sunday October 17, 2021 @09:32AM (#28896319)
Yes, you can type "man" at a powershell prompt, but it's not an incarnation of man that knows anything about git, despite the limits of what you're able to fathom.

    PS C:\> git --version
    git version 2.32.0.windows.2
    PS C:\> man git
    Get-Help : Get-Help could not find git in a help file in this session. To download updated help topics type:
    "Update-Help". To get help online, search for the help topic in the TechNet library at
    https:/go.microsoft.com/fwlink/?LinkID=107116.
I use `git help` regularly. I always pass it a git command. I didn't know there were other topics you can pass.

I do know about "Info", in several contexts. Foremost, it's short for "information". But I bet that's not what you're talking about. Trying to run it yields "info : The term 'info' is not recognized as..." and so on.

Re:Git Command Explorer by db48x on Monday October 18, 2021 @12:20AM (#28902201)
Oh, I have another question or two if you have a spare moment.

Have you ever used the SEE ALSO section in the git man pages to find related information? Could you have missed the links to non–commands merely because you already knew some git commands, so you never ran “git help” without one and thus you never saw the links to the tutorial? Or is there some other cause?

Incidentally, info is a different way to read documentation, one incorporating hyperlinks and a much more book–like organizational system of chapters, sections, etc. It’s a better way to document really large programs like Emacs. It’s available on most OSes, except apparently yours, and like man it allows applications to install their own documentation. It can also read man pages; it doesn’t change them very much (they don’t have chapters, for example), but it does turn references to other man pages into actual links.

Re:Git Command Explorer by recursive on Monday October 18, 2021 @07:56AM (#28904494)
I'm not sure if you're counting "git help" as being man pages. I use "git help", but never had much use for "man"-anything. The "git help" I get already has hyperlinks, as it's literally html documents opened in a browser. Some of the documents have a "see also" section at the end. I rarely get that far though, as I tend to read just as far as I need to solve the problem at hand.
Re:Git Command Explorer by db48x on Monday October 18, 2021 @10:29AM (#28905762)
Yea, those html pages are generated from the same source as, and are therefore identical to, the man pages.
Re:Git Command Explorer by db48x on Monday October 18, 2021 @12:04AM (#28902125)
That is extremely sad. Your OS has apparently broken man so that newly installed applications cannot add themselves to the manual.
Re:Git Command Explorer by recursive on Monday October 18, 2021 @07:57AM (#28904501)
Huh, it's never occurred to me to be sad about it. I don't mean to cause too much distress, but I think a lot of people use this operating system.
Re:Git Command Explorer by db48x on Monday October 18, 2021 @10:28AM (#28905753)
> … I think a lot of people use this operating system.

That makes me even sadder. They apparently don’t have man pages. :(

Re:Git Command Explorer by unnah on Sunday October 17, 2021 @12:43PM (#28897724)
You can also type "man gittutorial" (with or without quotes) on google or bing.
Re:Git Command Explorer by mixmastamyk on Sunday October 17, 2021 @04:15PM (#28899405)
Good point. Duck duck go preferred.
Re:Git Command Explorer by webreac on Monday October 18, 2021 @05:11PM (#28911813)
you can also type "man gittutorial" in your browser. I often do it to be able to see the manual while typing the command in the terminal.