I've tried to install the Git HTML help pages on OSX according to the instructions provided by the following links:
But when I get to the final verification step that involves running:
git help --web commit
I get the following error:
fatal: '/usr/local/git/share/doc/git-doc': not a documentation directory
I've verified that the folder, /usr/local/git/share/doc/git-doc was in fact created when I ran "git clone", and that it is full of files that appear to be git documentation files.
Can someone let me know what I am missing? Thanks!
Here is a short list of some of the files that were created in the git-doc folder:
EDIT: Just looked over the git clone results and found this warning, not sure if it makes a difference: "Remote branch html not found in upstream origin, using HEAD instead"
Change clone command address from
$ sudo git clone git://git.kernel.org/pub/scm/git/git.git git-doc --branch html
to
$ sudo git clone git://git.kernel.org/pub/scm/git/git-htmldocs.git git-doc
Hope this will be changed in Github tutorial soon.
UPDATE:
If you are one of those who thinks it’s enough to have Apple Git distribution supplied with Xcode 4:
# create directory to keep Git documentation html-files
$ sudo mkdir -p /usr/local/git/share/doc # or whatever directory you choose
# change to that directory
$ cd /usr/local/git/share/doc
# clone repo with documentation
$ sudo git clone git://git.kernel.org/pub/scm/git/git-htmldocs.git git-doc
# point your Git explicitly to a new documentation directory
$ git config --global help.htmlpath /usr/local/git/share/doc/git-doc
# tell Git to use html-formatted help by default
$ git config --global help.format html
This will create an entry in your .gitconfig like:
[help]
format = html
htmlpath = /usr/local/git/share/doc/git-doc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With