我已尝试根据以下链接提供的说明在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帮助
发布评论