0

I want to collect some dot files in one folder and keep it on GitHub.

So, dotfiles directory for me is .vim.

I moved .xmonad folder there as well. But unfortunately, when I wanted to copy my environment to other computer, I realized that .vim/xmonad/ is empty in my GitHub repo.

git add xmonad doesn't do anything.

git add xmonad/* gives the following error:

fatal: Path 'xmonad/get-volume' is in submodule 'xmonad'

Per this thread (Unable to track files within Git submodules), I checked my submodules, deleted .git file from xmonad directory, but nothing helps.

bv@ln:~$ cd .vim bv@ln:~/.vim$ ll -a total 76 drwxrwxr-x 6 bv bv 4096 Mar 18 06:48 ./ drwxr-xr-x 97 bv bv 4096 Mar 18 07:01 ../ drwxrwxr-x 2 bv bv 4096 Nov 4 17:48 autoload/ -rw-rw-r-- 1 bv bv 170 Jan 15 12:14 bash_profile -rw-r--r-- 1 bv bv 3868 Jan 15 15:40 bashrc drwxrwxr-x 19 bv bv 4096 Feb 6 17:32 bundle/ drwxrwxr-x 9 bv bv 4096 Mar 18 07:00 .git/ -rw-rw-r-- 1 bv bv 99 Mar 18 06:46 .gitignore -rw-rw-r-- 1 bv bv 1177 Dec 19 12:26 .gitmodules -rw-rw-r-- 1 bv bv 509 Jan 16 19:02 .netrwhist -rw-rw-r-- 1 bv bv 10710 Feb 6 18:16 README.md -rw-rw-r-- 1 bv bv 1243 Dec 20 16:21 tmux.conf -rw-rw-r-- 1 bv bv 10139 Jan 21 13:22 vimrc drwxr-xr-x 3 bv bv 4096 Mar 18 06:43 xmonad/ -rw-rw-r-- 1 bv bv 377 Jan 23 15:44 xsessionrc bv@ln:~/.vim$ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = [email protected]:bv/vim_pathogen.git fetch = +refs/heads/*:refs/remotes/origin/* [submodule "bundle/command-t"] url = git://git.wincent.com/command-t.git [submodule "bundle/nerdtree"] url = https://github.com/scrooloose/nerdtree.git [submodule "bundle/delmitmate"] url = git://github.com/Raimondi/delimitMate.git [submodule "bundle/tcomment"] url = https://github.com/tomtom/tcomment_vim [submodule "bundle/vim-colors-solarized"] url = git://github.com/altercation/vim-colors-solarized.git [submodule "bundle/tagbar"] url = git://github.com/majutsushi/tagbar.git [submodule "bundle/fugitive"] url = git://github.com/tpope/vim-fugitive.git [submodule "bundle/vim-unimpaired"] url = git://github.com/tpope/vim-unimpaired.git [submodule "bundle/vim-instant-markdown"] url = https://github.com/suan/vim-instant-markdown [submodule "vim-css-color"] url = [email protected]:ap/vim-css-color.git [submodule "bundle/ctrlp"] url = https://github.com/kien/ctrlp.vim.git bv@ln:~/.vim$ find . -name ".git*" ./bundle/vim-colors-solarized/.git ./bundle/indentLine/.gitattributes ./bundle/indentLine/.gitignore ./bundle/indentLine/.git ./bundle/tcomment/.gitignore ./bundle/tcomment/.git ./bundle/vim-rails/.gitignore ./bundle/vim-rails/.git ./bundle/vim-unimpaired/.gitignore ./bundle/vim-unimpaired/.git ./bundle/nerdtree/.gitignore ./bundle/nerdtree/.git ./bundle/vim-surround/.gitignore ./bundle/vim-surround/.git ./bundle/delmitmate/.gitignore ./bundle/delmitmate/.git ./bundle/tagbar/.gitattributes ./bundle/tagbar/.gitignore ./bundle/tagbar/.git ./bundle/ctrlp/.gitignore ./bundle/ctrlp/.git ./bundle/fugitive/.gitignore ./bundle/fugitive/.git ./bundle/vim-slim/.git ./bundle/vim-instant-markdown/.git ./bundle/vim-bundler/.gitignore ./bundle/vim-bundler/.git ./bundle/command-t/doc/.gitignore ./bundle/command-t/.gitattributes ./bundle/command-t/.gitmodules ./bundle/command-t/.gitignore ./bundle/command-t/ruby/command-t/.gitignore ./bundle/command-t/.git ./.gitmodules ./.gitignore ./.git bv@ln:~/.vim$ cat .gitmodules [submodule "bundle/command-t"] path = bundle/command-t url = git://git.wincent.com/command-t.git [submodule "bundle/nerdtree"] path = bundle/nerdtree url = https://github.com/scrooloose/nerdtree.git [submodule "bundle/delmitmate"] path = bundle/delmitmate url = git://github.com/Raimondi/delimitMate.git [submodule "bundle/tcomment"] path = bundle/tcomment url = https://github.com/tomtom/tcomment_vim [submodule "bundle/vim-colors-solarized"] path = bundle/vim-colors-solarized url = git://github.com/altercation/vim-colors-solarized.git [submodule "bundle/tagbar"] path = bundle/tagbar url = git://github.com/majutsushi/tagbar.git [submodule "bundle/fugitive"] path = bundle/fugitive url = git://github.com/tpope/vim-fugitive.git [submodule "bundle/vim-unimpaired"] path = bundle/vim-unimpaired url = git://github.com/tpope/vim-unimpaired.git [submodule "bundle/vim-instant-markdown"] path = bundle/vim-instant-markdown url = https://github.com/suan/vim-instant-markdown [submodule "vim-css-color"] path = vim-css-color url = [email protected]:ap/vim-css-color.git [submodule "bundle/ctrlp"] path = bundle/ctrlp url = https://github.com/kien/ctrlp.vim.git bv@ln:~/.vim$ git add xmonad/ bv@ln:~/.vim$ git st # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # (commit or discard the untracked or modified content in submodules) # # modified: bundle/indentLine (untracked content) # no changes added to commit (use "git add" and/or "git commit -a") bv@ln:~/.vim$ 

Thank you a lot!

1 Answer 1

1

Ok, https://stackoverflow.com/a/16581096/999973 answer helped me:

bv@ln:~/.vim$ git ls-tree HEAD xmonad 160000 commit c7a8d9a8f1e9858412e3e05901b20589087212a0 xmonad bv@ln:~/.vim$ git rm --cached xmonad 

Now everything is smooth!

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.