在OSX上安装Git HTML帮助

编程入门 行业动态 更新时间:2024-10-28 10:30:37
本文介绍了在OSX上安装Git HTML帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已尝试根据以下链接提供的说明在OSX上安装Git HTML帮助页面:

I've tried to install the Git HTML help pages on OSX according to the instructions provided by the following links:

  • help.github/install-git-html-help/
  • www.railsatwork/2010/12/installing-git-html-documentation-on.html

但是当我进入涉及运行的最后验证步骤时:

But when I get to the final verification step that involves running:

git help --web commit

我收到以下错误:

fatal: '/usr/local/git/share/doc/git-doc': not a documentation directory

我已经验证了/usr/local/git/share/doc/git-doc文件夹实际上是在我运行"git clone"时创建的,并且已经装满了看起来像git documentation的文件文件.

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!

以下是在git-doc文件夹中创建的一些文件的简短列表:

Here is a short list of some of the files that were created in the git-doc folder:

  • exec_cmd.c
  • exec_cmd.h
  • fast-import.c
  • fetch-pack.h
  • fixup-builtins
  • fmt-merge-msg.h
  • fsck.c
  • fsck.h
  • generate-cmdlist.sh
  • gettext.c
  • gettext.h
  • git-add--interactive.perl
  • git-am.sh
  • git-archimport.perl
  • git-bisect.sh
  • git-compat-util.h
  • git-cvsexportcommit.perl
  • git-cvsimport.perl
  • git-cvsserver.perl
  • git-difftool--helper.sh
  • git-difftool.perl
  • git-filter-branch.sh

只是查看了git clone的结果并发现了此警告,不确定是否会有所不同:在上游来源中找不到远程分支html,而使用HEAD"

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"

推荐答案

$ sudo git clone git://git.kernel/pub/scm/git/git.git git-doc --branch html

$ sudo git clone git://git.kernel/pub/scm/git/git-htmldocs.git git-doc

希望这会很快在Github教程中更改.

Hope this will be changed in Github tutorial soon.

更新:

如果您认为Xcode 4提供了Apple Git发行版就足够了:

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/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

这将在您的.gitconfig中创建一个条目,例如:

This will create an entry in your .gitconfig like:

[help] format = html htmlpath = /usr/local/git/share/doc/git-doc

更多推荐

在OSX上安装Git HTML帮助

本文发布于:2023-10-20 01:01:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1509361.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:OSX   Git   HTML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!