How to backup vim to github, including submodules
漂亮男人
漂亮男人 2017-05-02 09:51:06
0
2
874
  • I want to back up private vim configuration files and plug-ins to github, but some plug-ins are installed through vundle, and the directory has a .git repository.

  • What happens: When I am in the .vim directory

git init
git add .
git commit -m ""
git push

At this time, some submodules pushed to the github warehouse only have directory names and no files.

  • Google: You need to add the plug-in with the .git repository as a submodule to the .vim folder as a submodule,
    but the tutorial on the git official website submodule does not say how to add the local git repository to another git repository as submodule.

  • Question: How should I completely back up the entire .vim folder to github? If I want to back up the .vimrc file, some plug-ins still need to be downloaded from the plug-in official website through vundle. Some plug-ins seem to be downloaded slowly because the server is abroad. , such as YouComPleteMe.

漂亮男人
漂亮男人

reply all(2)
为情所困

Git backup should not include Vundle backups in the first place. If you really want to copy to another place where the network is inconvenient, you can write a script to package the corresponding files.

For example, under Windows, I have a script win_init.cmd:

  1. If you execute it directly, Vundle and other warehouses will be automatically downloaded. Check whether .vimrcdetorte配色方案拷贝到Windows下的相应目录。然后检查curl, ag, ctags, gtagsand other necessary tools are installed. If not, download them to the corresponding directory.

  2. win_init.cmd portable, it will package all local Vim-related files, copy them to other machines and decompress them, and also include various plug-ins installed under Vundle.

世界只因有你

Then back it up locally

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template