LoginSignup
0
0

More than 5 years have passed since last update.

git help -w ◯◯でエラーが出た時の対処

Posted at

git help -w ◯◯を実行するとブラウザでそのコマンドの説明が見れる、という機能があります。
ただ、これを試した時に私の環境だと上手く動かなかったのでその辺りの対処方法を書いていきます。

1つ目のエラー

最初に試した時に以下のエラーが表示されました。

$ git help -w ◯◯
fatal: HTML documentation is not provided by this distribution of git.

ん?と思い、とりあえずGitのバージョンを調べたらv1.9だったので一旦v2.6.4にアップデートしてみることにしてみました。

2つ目のエラー

アップデート後に再度実行してみた。

$ git help -w ◯◯
fatal: '/usr/local/git/share/doc/git-doc': not a documentation directory.

エラー内容が変わりましたね!
読むと指定されたパスにドキュメントが無い、ということがわかります。

確かに指定されたパスを見てみると/usr/local/git/shareの下にdocがありませんでした。
なので、ドキュメントを追加する作業を行います。

$ cd /usr/local/git/share
$ sudo mkdir doc
$ sudo git clone git://git.kernel.org/pub/scm/git/git-htmldocs.git git-doc 

ドキュメントを設置したことによって、git help -w ◯◯を実行できるはずです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0