简体   繁体   中英

How to include a file from .gitignore using git-clone?

I cloned a vim plugin like this:

git clone git@github.com:szw/vim-ctrlspace.git

When I tried the plugin, it works but I cannot access the help file.

I check the doc folder and the file ctrlspace.txt is there, but the tags file is missing. Then I checked the .gitignore which it contains the tags file. How do I include this tags file when cloning?

If this question is not a textbook XY problem I don't know what it is.

  1. Vim plugins are usually not installed via git clone unless you use Pathogen or some similar runtimepath manager.

  2. The tags file you are looking for doesn't come with the plugin. You must create it yourself.

  3. Assuming you use Pathogen, you need to run the :Helptags command to index the plugin's documentation or :helptags /path/to/directory/

Your "problem" has nothing to do with Git at all .

After installing a vim plugin, you might need to run the vim command

:helpt  ~/.vim/doc

(or whichever path you installed the plugin to, if it's not ~/.vim/)

As for your question, the tags file is in .gitignore so people working on the source code of vim-ctrlspace doesn't commit their locally generated tags file(a file generated by the ctags tool, that isn't related to any help files).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM