Search code examples
gitvimgithubgit-pushgit-clone

Git FULL push , no refs?


I am trying to push my .vim directory to github.

I am using pathogen ,so under .vim/bundle , I have some plugins , which are git repos too.

when I push to github they are converted to green folder icons (which as I understand are a ref to other repos).

here is a screen shot.

enter image description here

I want a full Backup of my .vim, so I could do git clone to my other machines too.

  • can I clone the repo from github full functional clone ? I get empty dirs under .vim/bundle.

  • or push it FULLY from my local machine , and avoiding those green folders all together ?


Solution

  • Git will detect git repositories in subdirectories, and add them as such by default – only noting the SHA of their currently checked out commit. You can circumvent that behaviour by running git add subfolder/*. But this only works if the given subfolder is not currently part of the cache. So in your case you need to run these commands (assuming there are no spaces in your folder names):

    git rm --cached bundle
    ls --color=never bundle | xargs -t -n1 -I {} git add "bundle/{}/"