简体   繁体   中英

Git Bash Terminal replies fatal : "C:/....": not a documentation directory

I entered this command on Git Bash Terminal on Windows and I got this:

   Anurag Nihal@LAPTOP-DK8BSQJ5 MINGW64 ~/Desktop/first-project (master)
   $ find .git/objects -type f
   .git/objects/44/00aae52a27341314f423095846b1f215a7cf08
   .git/objects/b7/aec520dec0a7516c18eb4c68b64ae1eb9b5a5e
   (base)
   Anurag Nihal@LAPTOP-DK8BSQJ5 MINGW64 ~/Desktop/first-project (master)
   $ help git mktree
   bash: help: no help topics match `mktree'.  Try `help help' or `man -k 
   mktree' or `info mktree'.
   (base)
   Anurag Nihal@LAPTOP-DK8BSQJ5 MINGW64 ~/Desktop/first-project (master)
   $ git mktree --help
   fatal: 'C:/ProgramData/Anaconda3/Library/mingw64/share/doc/git-doc': not a 
   documentation directory.
   (base)
   Anurag Nihal@LAPTOP-DK8BSQJ5 MINGW64 ~/Desktop/first-project (master)
   $ echo $HOME
   /c/Users/Anurag Nihal
   (base)

Kindly help me what should I do? I searched here and on the internet but most of them are for the working directory or the home directory. If I can get to know how to change the documentation directory, it will be very much helpful. I have recently started programming.

Thank you for your time and efforts.

It's basically trying to tell you that the documentation isn't installed where it thought it would be.

You can find it online easily; https://git-scm.com/docs/git-mktree

If you have the HTML documentation files installed locally in C:\whatever , try

git config --global help.htmlPath C:\whatever

This will be better handled with Git 2.34 (Q4 2021), where the error in " git help no-such-git-command " ( man ) is handled better.

See commit a3952f8 (14 Sep 2021) by Matthias Aßhauer ( rimrul ) .
(Merged by Junio C Hamano -- gitster -- in commit bd42622 , 23 Sep 2021)

help : make sure local html page exists before calling external processes

Signed-off-by: Matthias Aßhauer

We check that git.html exists, regardless of the page the user wants to open.
Checking whether the requested page exists instead gives us a smoother user experience in two use cases:

  1. The requested page doesn't exist

When calling a git command and there is an error, most users reasonably expect git to produce an error message on the standard error stream, but in this case we pass the filepath to git web--browse ( man ) which passes it on to a browser (or a helper program like xdg-open or start that should in turn open a browser) without any error and many GUI based browsers or helpers won't output such a message onto the standard error stream.

Especially the helper programs tend to show the corresponding error message in a message box and wait for user input before exiting.
This leaves users in interactive console sessions without an error message in their console, without a console prompt and without the help page they expected.

  1. git.html is missing for some reason, but the user asked for some other page

We currently refuse to show any local html help page when we can't find git.html .
Even if the requested help page exists.
If we check for the requested page instead, we can show the user all available pages and only error out on those that don't exist.

So no more:

xxx not a documentation directory

Rather:

'yyy.html': documentation file not found

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM