I have spent some time chasing the wild goose (well - the .gitignore
file) after getting:
$> git-submodule add --name fcx-1 ./fcx-1/ ./fcx-1/
The following path is ignored by one of your .gitignore files:
Use -f if you really want to add it.
long story short -- the culprit is this piece of code in git-submodule:
if test -z "$force" && ! git add --dry-run --ignore-missing "$sm_path" >
eval_gettextln "The following path is ignored by one of your .gitignore
Use -f if you really want to add it." >&2
so if anything goes wrong in git add, it just reports this error
FTR -- actual problem in my case was:
$> git add --dry-run --ignore-missing fcx-1
fatal: Unable to create
'/mnt/datasets/datalad/crawl/crcns/.git/index.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
P.S. Please CC me in replies
Yaroslav O. Halchenko
Center for Open Neuroscience http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419