Installing Git HTML help

來源:互聯網
上載者:User
文章目錄
  • Installing
  • Updating the docs
  • Nothing to see here folks...
  • Installing
  • Updating the docs

his guide will help you install the local git HTML help files and set git to use them by default instead of the man pages.

Most git installations will install man files for help, but not the HTML help files (the same files seen on git's online documentation). Installing these help files is a fairly simple process.

Installing

To install web docs we simply need to clone the main git repo to the correct path and check out the "html" branch. Your documentation path may be different, pay attention to the output of
git help --web commit for where your git is set to look for the HTML files.

git help --web commit# Attempt to open the html help for the commit command# fatal: '/usr/local/git/share/doc/git-doc': not a documentation directory.sudo mkdir -p /usr/local/git/share/doc# Create the path for the docs to be installed tocd /usr/local/git/share/doc$ sudo git clone git://git.kernel.org/pub/scm/git/git-htmldocs.git git-doc# Clone the git repo and check out the html documents branch

To verify that the web docs now work, run git help --web commit. If your browser launches then you're good to go. You can now set git to default to the web docs by running
git config --global help.format web

Updating the docs

Updating is a simple matter of pulling:

$ cd /usr/local/git/share/doc/git-doc$ sudo git pull
Nothing to see here folks...

Msysgit installs and sets the HTML help files as the default automatically. You don't need to do anything!

Installing

To install web docs we simply need to clone the main git repo to the correct path and check out the "html" branch. Your documentation path may be different, pay attention to the output of
git help --web commit for where your git is set to look for the HTML files.

git help --web commit# Attempt to open the html help for the commit command# fatal: '/usr/share/doc/git-doc': not a documentation directory.sudo mkdir -p /usr/share/doc# Create the path for the docs to be installed tocd /usr/share/doc$ sudo git clone git://git.kernel.org/pub/scm/git/git-htmldocs.git git-doc# Clone the git repo and check out the html documents branch

To verify that the web docs now work, run git help --web commit. If your browser launches then you're good to go. You can now set git to default to the web docs by running
git config --global help.format web

Updating the docs

Updating is a simple matter of pulling:

$ cd /usr/share/doc/git-doc$ sudo git pull

轉載:https://help.github.com/articles/installing-git-html-help#platform-linux

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.