Trying to commit folder, but git just doesn't see one.

At the same time in MacVim's NERDTree (I have Janus distribution installed) all files from that folder are appearing with the wildcard at the end.

The folder doesn't seem to be excluded by .gitignore (checked it removing it at all). I have tried to re-save the files, with, git add --force / -A. Nothing happens.

What do these wildcards means? Are they related to my problem?

link|improve this question
feedback

1 Answer

The asterisks at the end of filenames mean the same thing as the asterisks when you do $ ls -a: "executable file". NERD_Tree doesn't know or care about GIT so, in other words, neither the asterisk nor NERD_Tree are directly related to your problem.

But NERD_Tree may be indirectly related to your problem: by default it doesn't change the working directory when you enter different directories. So it's possible that you do :! git commit in a different directory than the one you think you are in. One that is not under version control.

Type :pwd to know where Vim is, if it's not the right directory you can change it with :cd /path/to/your/versioned/directory.

If you are often in the wrong directory you can add two lines to your ~/.vimrc to force Vim's working directory to always be the one containing the current file:

set autochdir
let NERDTreeChDirMode=2

The first is a Vim setting (:help autochdir), the second is a NERD_Tree setting (:help nerd_tree).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.